R2_bayes | R Documentation |
Bayesian version of R-squared for flexible regression models for continuous bounded or binomial responses
R2_bayes(model)
model |
an object of class |
The function provides a Bayesian version of the R-squared measure, defined as the variance of the predicted values divided by itself plus the expected variance of the errors.
Gelman, A., Goodrich, B., Gabry, J., Vehtari, A. (2019). R-squared for Bayesian Regression Models, The American Statistician, 73:3, 307–309. doi: 10.1080/00031305.2018.1549100
data("Reading") FB <- flexreg(accuracy.adj ~ iq, data = Reading, type = "FB", n.iter=1000) hist(R2_bayes(FB))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.