R-squared 的后验分布
首先,我们来获取 R-squared 统计量的后验分布,以便对模型的预测能力进行推断。使用 Spotify 数据的 stan_model 已经加载。
本练习是课程的一部分
使用 rstanarm 进行贝叶斯回归建模
练习说明
- 计算 R-squared 统计量的后验分布
- 绘制 R-squared 分布的直方图
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Calculate the posterior distribution of the R-squared
r2_posterior <- ___(stan_model)
# Make a histogram of the distribution
___(r2_posterior)