Generic front doors onto the two criteria tulpa_criteria() computes that
the loo package owns no generic for. WAIC and PSIS-LOO have theirs
(loo::waic(), loo::loo()), so a model package registers methods on
those rather than on new names that would mask them.
Usage
dic(object, ...)
# Default S3 method
dic(object, loglik_at_mean = NULL, ...)
cpo(object, ...)
# Default S3 method
cpo(object, ...)Arguments
- object
A pointwise log-likelihood matrix (draws x observations), or a fitted model object a method is registered for.
- ...
Passed to
tulpa_criteria()(e.g.group,chunk_size).- loglik_at_mean
Length-
n_obsvector of pointwise log-likelihoods at the posterior mean of the parameters. Required for DIC's plug-in deviance; without it the DIC fields areNA.
Details
The default methods take a draws x observations pointwise log-likelihood
matrix, the same input tulpa_criteria() takes. A model package registers a
method taking its own fit object, builds the matrix from the posterior, and
delegates here.
See also
tulpa_criteria() for every criterion at once and for what the LOO
unit means.