The tulpa::pit_residuals() method for tobs_fit: the family's own
predictive CDF, with the randomisation step a discrete response needs.
Usage
# S3 method for class 'tobs_fit'
pit_residuals(
object,
n.samples = 250,
nsim = NULL,
seed = NULL,
observed = NULL,
...
)Arguments
- object
A
tobs_fitobject.- n.samples
Number of posterior samples (default 250).
- nsim
Alias for
n.samples, and the nametulpa::test_uniformity()forwards under. An explicitnsimwins, so a uniformity test run atnsim = 2000draws 2000 samples rather than the default 250.- seed
Optional RNG seed for the posterior-draw selection, forwarded by
tulpa::test_uniformity(). Set it and repeated calls return the same residuals; the caller's RNG stream is restored afterwards.- observed
Must be
NULL, which is whattulpa::test_uniformity()forwards by default: a latent-state fit scores the response it was fitted to.- ...
Must be empty; an unrecognised argument is an error.
See also
tulpa::test_uniformity() for the uniformity test on the result.