Learn R Programming

performance (version 0.1.0)

looic: 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.

Usage

looic(model)

Arguments

model

A Bayesian regression model.

Value

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

Examples

Run this code
# NOT RUN {
library(rstanarm)

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

# }

Run the code above in your browser using DataLab