拟合一个贝叶斯线性回归
练习拟合一个贝叶斯模型。这与我们已用频率学方法估计过的模型相同,因此稍后可以比较参数输出。songs 数据已加载。
本练习是课程的一部分
使用 rstanarm 进行贝叶斯回归建模
练习说明
- 创建一个贝叶斯线性模型
stan_model,用于根据歌曲的年龄预测歌曲的流行度 - 打印该贝叶斯线性模型的摘要
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Create the model here
stan_model <- ___(___ ~ ___, data = songs)
# Produce the summary
___(stan_model)
# Print a tidy summary of the coefficients
___(stan_model)