| loo.brma | R Documentation |
Extract the LOO-PSIS object from a brma model object.
The LOO must first be computed using add_loo.
## S3 method for class 'brma'
loo(x, unit = "estimate", ...)
x |
a brma model object. |
unit |
output/deletion unit. See |
... |
additional arguments (currently unused). |
This function extracts the LOO object that was previously computed and
stored using object <- add_loo(object, unit = unit). If LOO has not
been computed for the requested unit, an error is thrown.
This is the RoBMA S3 generic and brma method. Use
loo directly for raw log-likelihood arrays or matrices.
An object of class c("psis_loo", "loo") as returned by
loo.
add_loo, loo,
loo_compare, pareto_k_ids
## Not run:
if (requireNamespace("metadat", quietly = TRUE)) {
data(dat.lehmann2018, package = "metadat")
fit <- bPET(yi = yi, vi = vi, data = dat.lehmann2018, measure = "SMD")
fit <- add_loo(fit)
loo_fit <- loo(fit)
print(loo_fit)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.