| waic.clmstan | R Documentation |
Computes the Widely Applicable Information Criterion (WAIC) for a fitted cumulative link model.
## S3 method for class 'clmstan'
waic(x, ...)
x |
A |
... |
Additional arguments (currently ignored). |
WAIC is an alternative to LOO-CV that is asymptotically equivalent to leave-one-out cross-validation. However, LOO-CV with PSIS is generally preferred because:
It provides useful diagnostics (Pareto k values)
It is more robust in finite samples
It has been shown to be more reliable in practice
For most purposes, loo.clmstan is recommended over WAIC.
An object of class c("waic", "loo") containing:
estimates: A matrix with columns Estimate and SE
for elpd_waic, p_waic, and waic.
pointwise: A matrix with pointwise contributions.
loo.clmstan for LOO-CV (recommended),
waic for details on WAIC computation,
loo_compare for model comparison.
## Not run:
fit <- clm_stan(rating ~ temp, data = wine)
waic_result <- waic(fit)
print(waic_result)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.