调整估计过程

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

Jake Thompson

Psychometrician, ATLAS, University of Kansas

发散跃迁

1: 预热后出现 15 次发散跃迁。将 adapt_delta 提高到
0.8 以上可能有帮助。
  • 估计器步长过大
  • 调整步长
stan_model <- stan_glm(popularity ~ song_age, data = songs,
  control = list(adapt_delta = 0.95))
stan_model <- stan_glm(popularity ~ song_age, data = songs,
  control = list(adapt_delta = 0.99))
使用 rstanarm 进行贝叶斯回归建模

超出最大树深度

链 1 达到最大树深度
  • 采样沿分支评估,并寻找合适的"U 形转弯"点
  • 最大树深度提示效率较差
stan_model <- stan_glm(popularity ~ song_age, data = songs,
  control = list(max_treedepth = 10))
stan_model <- stan_glm(popularity ~ song_age, data = songs,
  control = list(max_treedepth = 15))
使用 rstanarm 进行贝叶斯回归建模

调整估计

  • 估计误差威胁模型的有效性
  • 虽然机制复杂,但可用简单设置解决
使用 rstanarm 进行贝叶斯回归建模

Passons à la pratique !

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

Preparing Video For Download...