psrf = 1.0047
Runjags对显然存在收敛问题的链的报告非常低:
> print(o, vars = "q_date2")
JAGS model summary statistics from 3000 samples (chains = 3; adapt+burnin = 1000):
Lower95 Median Upper95 Mean SD MCerr MC%ofSD SSeff AC.10 psrf
q_date2 -0.17611 -0.10467 0.0053844 -0.087376 0.063296 0.023726 37.5 7 0.022495 1.0047
当我尝试计算psrf
使用尾声时,我得到的结果看起来更合理:
> gelman.diag(as.mcmc.list(o)[,'q_date2'], transform=FALSE, autoburnin=FALSE)
Potential scale reduction factors:
Point est. Upper C.I.
[1,] 3.54 7.94
那么为什么psrf
runjags 的报告如此之低呢?这是runjags的问题,还是我做错了什么?
我在 R 3.1.0 中使用当前版本的 runjags (1.2.1-0)。
编辑:在创建摘要期间,我收到了警告 - 很抱歉之前没有提到它们:
Warning messages:
1: In autocorrs[x$stochastic] <- x$autocorr[4, ] :
number of items to replace is not a multiple of replacement length
2: In psrfs[x$stochastic] <- x$psrf$psrf[, 1] :
number of items to replace is not a multiple of replacement length