Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

R2D2

R2-D2 Priors in brms


Description

Function used to set up R2D2 priors for population-level effects in brms. The function does not evaluate its arguments – it exists purely to help set up the model.

Usage

R2D2(mean_R2 = 0.5, prec_R2 = 2, cons_D2 = 1, autoscale = TRUE)

Arguments

mean_R2

mean of the Beta prior on the coefficient of determination R^2.

prec_R2

precision of the Beta prior on the coefficient of determination R^2.

cons_D2

concentration vector of the Dirichlet prior on the variance decomposition parameters.

autoscale

Logical; indicating whether the horseshoe prior should be scaled using the residual standard deviation sigma if possible and sensible (defaults to TRUE). Autoscaling is not applied for distributional parameters or when the model does not contain the parameter sigma.

References

Zhang, Y. D., Naughton, B. P., Bondell, H. D., & Reich, B. J. (2020). Bayesian regression using a prior on the model fit: The R2-D2 shrinkage prior. Journal of the American Statistical Association. https://arxiv.org/pdf/1609.00046.pdf

See Also

Examples

set_prior(R2D2(mean_R2 = 0.8, prec_R2 = 10))

brms

Bayesian Regression Models using 'Stan'

v2.15.0
GPL-2
Authors
Paul-Christian Bürkner [aut, cre], Jonah Gabry [ctb], Sebastian Weber [ctb], Andrew Johnson [ctb], Martin Modrak [ctb]
Initial release
2021-03-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.