The tulpa::check_model() method for tobs_fit: the criteria, the
posterior-predictive check and the goodness-of-fit tests in one call,
printed as a report and drawn as the diagnostic panel.
Usage
# S3 method for class 'tobs_fit'
check_model(
object,
coords = NULL,
n.samples = 250,
nsim = NULL,
seed = NULL,
plot = TRUE,
...
)Arguments
- object
A
tobs_fitobject.- coords
Optional
n_sites x 2coordinate matrix. Adds Moran's I on the occupancy residuals and the correlogram panel.- n.samples
Posterior samples for simulation tests.
- nsim
The same budget under the name
tulpa::check_model()'s default uses; overridesn.sampleswhen given.- seed
Optional random seed for the simulation tests; the caller's RNG stream is restored afterwards.
- plot
Draw the panel.
FALSEprints the report alone, for a log or a headless run.- ...
Must be empty; an unrecognised argument is an error.
Value
Invisibly, the diagnostic results: waic, dic, cpo, ppc,
zero_inflation, dispersion, pit, uniformity, and moran when
coords is supplied.
Details
The engine's default method builds its panel from fitted() and
residuals() as numeric vectors, which a latent-state fit does not have –
fitted() returns list(psi, p, z) and residuals() one series per
process, so the response cannot be resolved. This method reads the same
quantities through the family's own doors instead: pit_residuals(),
ppc(), test_dispersion() and tulpa::moran_i().