Skip to contents

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 class '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-normalized importance sampling when using posterior draws obtained with MCMC. If MCMC draws are used and r_eff is not provided then the reported PSIS effective sample sizes and Monte Carlo error estimates can be over-optimistic. If the posterior draws are (near) independent then r_eff=1 can be used. r_eff has to be a scalar (same value is used for all observations) or a vector with length equal to the number of observations. The default value is 1. See the relative_eff() helper functions for help computing r_eff.

force

If the LOO criterion has already been added to the model object with add_criterion(), should it be recalculated. Default is FALSE.

Value

The object returned by loo::loo.array().