未调整的先验
现在我们来指定一个不对先验分布使用调整后尺度的模型,从而改变 rstanarm 的默认行为。这样您就能更直接地控制用于估计的信息。songs 数据已加载。
本练习是课程的一部分
使用 rstanarm 进行贝叶斯回归建模
练习说明
- 用
song_age预测popularity - 告诉
rstanarm不要对参数进行自动缩放 - 打印先验摘要以确认没有进行调整
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Estimate the model with unadjusted scales
no_scale <- stan_glm(popularity ~ song_age, data = songs,
___ = normal(___ = FALSE),
___ = normal(___ = FALSE),
___ = exponential(___ = FALSE)
)
# Print the prior summary
___(no_scale)