| loo_compare.brma | R Documentation |
Compare multiple brma models using LOO-PSIS cross-validation.
This is a convenience wrapper around loo_compare.
## S3 method for class 'brma'
loo_compare(x, ..., unit = "estimate")
x |
a brma model object (the first model to compare). |
... |
additional brma model objects or |
unit |
output/deletion unit used when extracting LOO from brma objects. |
This function compares models based on their expected out-of-sample predictive performance (ELPD).
Important for model comparison: When comparing models via
loo_compare, the selection is based on expected
out-of-sample predictive performance. This evaluates how well models predict
new observations, not how well they fit the observed data.
RoBMA rejects comparisons with different outcome targets/data, unit,
or implied conditioning_depth.
A matrix of class "compare.loo" as returned by
loo_compare.
loo.brma, loo_compare
## Not run:
if (requireNamespace("metadat", quietly = TRUE)) {
data(dat.lehmann2018, package = "metadat")
fit_bias <- RoBMA(yi = yi, vi = vi, data = dat.lehmann2018, measure = "SMD")
fit_nobias <- BMA(yi = yi, vi = vi, data = dat.lehmann2018, measure = "SMD")
fit_bias <- add_loo(fit_bias)
fit_nobias <- add_loo(fit_nobias)
loo_compare(fit_bias, fit_nobias)
loo_compare(loo(fit_bias), loo(fit_nobias))
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.