Learn R Programming

qbrms (version 1.0.1)

loo_compare: Compare models by LOO (default) or WAIC

Description

Compare multiple fitted models and rank them by out-of-sample fit. If you pass qbrms/qbrmO fit objects, this uses the package's loo() / waic() wrappers under the hood. If you pass actual loo objects (from the loo package), it will delegate to loo::loo_compare() automatically.

Usage

loo_compare(..., criterion = c("loo", "waic"), sort = TRUE)

Value

A data.frame with model names, estimate on the ELPD scale (higher is better), standard error (if available), differences vs best, and ranks.

Arguments

...

One or more fitted models (qbrms/qbrmO), or loo objects; you can also pass a single named list of models.

criterion

Character, "loo" (default) or "waic".

sort

Logical; if TRUE (default) the best model is first.