1. 学习
  2. /
  3. 课程
  4. /
  5. Bayesian Regression Modeling with rstanarm

Connected

练习

R-squared for a Bayesian Model

Now let's calculate the R-squared for a Bayesian model so we can assess the predictions of models estimated with stan_glm. The stan_model object is already loaded.

说明

100 XP
  • Calculate the variance of the residuals of stan_model
  • Calculate the variance of the fitted values of stan_model
  • Calculate the R-squared