Skip to contents

Computes the Widely Applicable Information Criterion (WAIC) for a fitted cumulative link model.

Usage

# S3 method for class 'clmstan'
waic(x, ...)

Arguments

x

A clmstan object returned by clm_stan.

...

Additional arguments (currently ignored).

Value

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.

Details

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.

See also

loo.clmstan for LOO-CV (recommended), waic for details on WAIC computation, loo_compare for model comparison.

Examples

if (FALSE) { # \dontrun{
fit <- clm_stan(rating ~ temp, data = wine)
waic_result <- waic(fit)
print(waic_result)
} # }