A loo::loo()
method that is customized for measrfit
objects. This is a
simple wrapper around loo::loo.array()
. See the loo package
vignettes for details.
Usage
# S3 method for measrfit
loo(x, ..., r_eff = NA, force = FALSE)
Arguments
- x
A measrfit object.
- ...
Additional arguments passed to
loo::loo.array()
.- r_eff
Vector of relative effective sample size estimates for the likelihood (
exp(log_lik)
) of each observation. This is related to the relative efficiency of estimating the normalizing term in self-normalizing importance sampling when using posterior draws obtained with MCMC. If MCMC draws are used andr_eff
is not provided then the reported PSIS effective sample sizes and Monte Carlo error estimates will be over-optimistic. If the posterior draws are independent thenr_eff=1
and can be omitted. The warning message thrown whenr_eff
is not specified can be disabled by settingr_eff
toNA
. See therelative_eff()
helper functions for computingr_eff
.- force
If the LOO criterion has already been added to the model object with
add_criterion()
, should it be recalculated. Default isFALSE
.
Value
The object returned by loo::loo.array()
.