Rank fitted models best-first by an information criterion. "waic" and
"loo" use the native pointwise log-likelihood layer (tulpa_criteria() /
tulpa_psis()) – WAIC and PSIS-LOO respectively, computed from each fit's
[n_draws x n_obs] pointwise log-likelihood (fit$draws$log_lik), with no
loo package dependency. "loglik" returns the (integrated) joint
log-likelihood with the parameter count. A fit carrying no pointwise
log-likelihood (a deterministic / point approximation) yields NA criterion
columns rather than an error, so the table always has one row per model.
Usage
compare_models(..., criterion = c("waic", "loo", "loglik"))Value
A data frame. For "loglik": model, n_params, logLik. For
"waic" / "loo" (ranked best-first): model, elpd, se_elpd,
p_eff, ic (-2 * elpd), delta (elpd gap to the best model),
se_diff (SE of that pointwise elpd difference), and weight (the
Akaike-style weight on the criterion).
See also
model_average() for model-averaged predictions, tulpa_criteria()
and tulpa_psis() for the native criteria layer.