library(R2WinBUGS)
の bugs()
関数が生成する
bugs
オブジェクト
(上の図は plot(bugs オブジェクト)
図)
lichen.bugs
を print(lichen.bugs, digits.summary = 3)
すると
Inference for Bugs model at "/home/kubo/lichen/mcmc/lichen.bug", fit using
WinBugs, 3 chains, each with 60000 iterations (first 30000 discarded),
n.thin = 100 n.sims = 900 iterations saved
mean sd 2.5% 25% 50% 75% 97.5% Rhat n.eff
pbase[1] 1.446 0.237 1.013 1.263 1.448 1.608 1.925 1.041 66
pbase[2] -0.843 0.409 -1.635 -1.128 -0.840 -0.567 -0.041 1.043 62
parea[1] 1.820 0.112 1.614 1.734 1.821 1.899 2.037 1.017 150
parea[2] 1.535 0.162 1.226 1.424 1.532 1.647 1.856 1.034 76
psri[1] 0.543 0.298 -0.043 0.342 0.539 0.752 1.087 1.034 77
psri[2] 0.030 0.408 -0.749 -0.244 0.028 0.302 0.857 1.010 590
iv.pface 1.291 0.288 0.822 1.104 1.247 1.450 1.930 1.012 240
iv.pid 1.018 0.084 0.864 0.959 1.013 1.073 1.190 1.004 450
pface[1] 0.018 0.408 -0.780 -0.245 0.012 0.305 0.808 1.029 71
pface[2] 0.278 0.433 -0.506 -0.030 0.287 0.589 1.116 1.001 900
... (中略) ...
pface[63] -0.280 0.299 -0.812 -0.495 -0.303 -0.085 0.372 1.002 900
deviance 3476.261 39.377 3400.000 3450.000 3473.500 3503.250 3556.000 1.000 900
For each parameter, n.eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor (at convergence, Rhat=1).
pD = 525.3 and DIC = 4001.5 (using the rule, pD = Dbar-Dhat)
DIC is an estimate of expected predictive error (lower deviance is better).
ここで
Rhat
についての簡単な説明もでるわけだが
……
より詳しくは,
たとえば
R2WinBUGS
論文,
つまり
Sturtz,S., Ligges, U. and Gelman, A.
2005.
R2WinBUGS: A package for running WinBUGS
from R. Journal of Statistical Software 12:1-16.
(Gelman web site のこの猛烈なる
published papers
からダウンロードできる;
Gelman and Rubin (1992) の PDF file もある)
なんかはどうかね,
と眺めてみると,
In this plot, the left column shows a quick summary of inference and
convergence (R is close to 1.0 for all parameters, indicating good mixing of
the three chains and thus approximate convergence); and the right column
shows inferences for each set of parameters.
としか説明してない.
Gelman たちの
Bayesian Data Analysis 本
(2003)
の ``11.6 Inference and assessing convergence''
などに library(R2WinBUGS)
のR-hat
などに対応する定義が示されている.
Gelman and Rubin (1992) の定義もこれとほとんど同じだけど,
びみょーに異なるような気がする.