looic: LOO-related Indices for Bayesian regressions.

View source: R/looic.R

looicR Documentation

LOO-related Indices for Bayesian regressions.

Description

Compute LOOIC (leave-one-out cross-validation (LOO) information criterion) and ELPD (expected log predictive density) for Bayesian regressions. For LOOIC and ELPD, smaller and larger values are respectively indicative of a better fit.

Usage

looic(model, verbose = TRUE)

Arguments

model

A Bayesian regression model.

verbose

Toggle off warnings.

Value

A list with four elements, the ELPD, LOOIC and their standard errors.

Examples



model <- suppressWarnings(rstanarm::stan_glm(
  mpg ~ wt + cyl,
  data = mtcars,
  chains = 1,
  iter = 500,
  refresh = 0
))
looic(model)



performance documentation built on Oct. 19, 2024, 1:07 a.m.