| loo,mafit-method {publipha} | R 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 |
... |
passed to |
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)
[Package publipha version 0.1.2 Index]