loo-mafit-method: Calculate the 'loo' for an 'ma' object.

loo,mafit-methodR Documentation

Calculate the loo for an ma object.

Description

Computes PSIS-LOO CV, approximate leave-one-out cross-validation using Pareto smoothed importance sampling, see loo.

Usage

## S4 method for signature 'mafit'
loo(x, ...)

Arguments

x

an object of class mafit.

...

passed to loo. Only

Details

... affect the function through two parameters, marginal and lower_bound. When marginalis TRUE, the PSIS-LOO CV is based on the marginal likelihood, i.e. with the dependence on theta integrated out. marginal defaults to TRUE. lower_bound species the lower bound where log-likelihoods are dropped; this is only used in the p-hacking model and defaults to -6.

Value

A loo object.

Examples


phma_model <- phma(yi, vi, data = metadat::dat.begg1989)
psma_model <- psma(yi, vi, data = metadat::dat.begg1989)
loo(phma_model)
loo(psma_model)


publipha documentation built on April 4, 2023, 5:19 p.m.