开始使用免费开始使用

调整估计设置

现在请调整估计选项,以便为可能出现的错误做好准备。一旦出现错误,及时解决非常重要,这样才能确保我们的推断是有效的。songs 数据已加载。

本练习是课程的一部分

使用 rstanarm 进行贝叶斯回归建模

查看课程

练习说明

  • 估计两个以 song_age 预测 popularity 的模型
  • 在第一个模型中,将 adapt_delta 设为 0.99
  • 在第二个模型中,将 max_treedepth 设为 15
  • 查看每个模型的摘要

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Estimate the model with a new `adapt_delta`
adapt_model <- ___(popularity ~ song_age, data = songs,
  ___ = list(___ = ___))

# View summary
___(adapt_model)

# Estimate the model with a new `max_treedepth`
tree_model <- ___(popularity ~ song_age, data = songs,
  ___ = list(___ = ___))

# View summary
___(tree_model)
编辑并运行代码