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.
Examples
# \donttest{
model <- suppressWarnings(rstanarm::stan_glm(
mpg ~ wt + cyl,
data = mtcars,
chains = 1,
iter = 500,
refresh = 0
))
looic(model)
#> # LOOIC and ELPD with Standard Error
#>
#> LOOIC: 157.05 [9.03]
#> ELPD: -78.52 [4.51]
# }