【发布时间】:2018-05-27 22:53:09
【问题描述】:
我目前正在运行R 中rstan 包中的stan_glm 和stan_glmer 等函数。我将每个函数调用了 1000 次,结果发现其中大约 75% 的运行会导致以下警告:
Warning messages:
1: There were 184 divergent transitions after warmup. Increasing adapt_delta above 0.95 may help. See
http://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
2: There were 1 chains where the estimated Bayesian Fraction of Missing Information was low. See
http://mc-stan.org/misc/warnings.html#bfmi-low
3: Examine the pairs() plot to diagnose sampling problems
4: Markov chains did not converge! Do not analyze results!
我想创建一个 while 循环来重新运行该函数,直到遇到没有警告的运行。有没有办法标记或检测上述警告消息?谢谢。
【问题讨论】: