powered by
Compute LOO-adjusted R2.
r2_loo(model)
A Bayesian regression model.
The LOO-adjusted R2 for model, as numeric value.
model
Unlike r2_bayes, which returns an "unadjusted" R2 value, r2_loo() calculates a LOO-adjusted R2, which comes conceptionally closer to an "adjusted" R2 measure.
r2_bayes
r2_loo()
# NOT RUN { library(rstanarm) model <- stan_glm(mpg ~ wt + cyl, data = mtcars, chains = 1, iter = 500) r2_loo(model) # }
Run the code above in your browser using DataLab