View source: R/model_comparison.R
loo.rater_fit | R Documentation |
Compute the PSIS LOO CV - a measure of model fit - of a rater fit object.
## S3 method for class 'rater_fit'
loo(x, ..., cores = getOption("mc.cores", 1))
x |
A |
... |
Other arguments passed. |
cores |
The number of cores to use when calling the underlying
functions. By default the value of the |
This function is somewhat experimental; model comparison is always difficult and choosing between variants of the Dawid-Skene model should be largely guided by considerations of data size and what is known about the characteristics of the raters. loo is, however, one of the leading methods for Bayesian model comparison and should provide a helpful guide in many situations.
When calculating loo we always use the relative effective
sample size, calculated using loo::relaive_eff
to improve the estimates
of the PSIS effective sample sizes and Monte Carlo error.
For further information about the details of loo and PSIS please consult the provided references.
A loo object.
Vehtari, A., Gelman, A., and Gabry, J. (2017a). Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC. Statistics and Computing. 27(5), 1413–1432. doi:10.1007/s11222-016-9696-4 (journal version, preprint arXiv:1507.04544).
Vehtari, A., Simpson, D., Gelman, A., Yao, Y., and Gabry, J. (2019). Pareto smoothed importance sampling. preprint arXiv:1507.02646
fit_ds <- rater(anesthesia, "dawid_skene", verbose = FALSE, chains = 1)
fit_ccds <- rater(anesthesia, "class_conditional_dawid_skene",
verbose = FALSE, chains = 1)
loo_ds <- loo(fit_ds)
loo_ccds <- loo(fit_ccds)
# To compare the loos easily we can use the loo_compare function from the
# loo package:
library(loo)
loo_compare(loo_ds, loo_ccds)
# The documentation of the loo package contains more information about how
# the output should be interpreted.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.