r2bayes: Bayesian R2

r2_bayesR Documentation

Bayesian R2

Description

Calculate Bayesian R2 with control over which random effects are included. This function uses the method described in: Gelman, A., Goodrich, B., Gabry, J., & Vehtari, A. (2019). R-squared for Bayesian regression models. The American Statistician, 73(3), 307–309.

Usage

r2_bayes(model, re_formula = NULL, summary = TRUE)

r2bayes(model, re_formula = NULL, summary = TRUE)

R2_bayes(model, re_formula = NULL, summary = TRUE)

R2bayes(model, re_formula = NULL, summary = TRUE)

Arguments

model

brms hypothesis object.

re_formula

formula containing group-level effects to be considered in the prediction. If NULL (default), include all group-level effects; if NA, include no group-level effects.

summary

if TRUE, R2 values are summarized.

Examples

## Not run: 
 # coming soon

## End(Not run)

santiagobarreda/bmmb documentation built on June 11, 2024, 5:33 p.m.