From: Rodney S. <rsp...@mc...> - 2012-02-06 15:20:38
|
Subject:R2OpenBUGS mis-reports pD and DIC From: Timothy Handley <Tim...@NP...> Date: Fri, 3 Feb 2012 10:16:46 -0600 I ran a model using R2OpenBUGS. The latter bit of output was: b.pcov.sd.u[1] 1.3 0.1 1.2 1.3 1.3 1.4 1.5 1 1600 c.Nzero.pre 142.3 6.3 129.0 138.0 142.0 147.0 154.0 1 1800 deviance 1175.0 24.6 1129.0 1158.0 1174.0 1191.0 1225.0 1 1800 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). DIC info (using the rule, pD = Dbar-Dhat) pD = 1400.0 and DIC = 224.9 DIC is an estimate of expected predictive error (lower deviance is better). The pD value was shocking. This model has several random effects, but even so, I expected no more than 200 effective parameters. On further thought, I was concerned to see that mean deviance (1175) plus pD (1400) was not equal to DIC (224.9). So I reran the model with debug=TRUE. Then, from within the OpenBUGS GUI, I opened the DIC tool, and asked for stats on the node corresponding to the data. OpenBUGS reported the following: Deviance information Dbar Dhat DIC pD ones 1175.0 950.1 1400.0 224.9 These numbers are in the range of believability. They also have the expected relationship, with DIC=Dbar+pD. So it seems that R2OpenBUGS reverses the values for pD and DIC. It prints the value for DIC in the space for pD, and prints the value for pD in the space for DIC. Tim Handley Research Assistant Mediterranean Network, NPS 805-658-5759 (CHIS) 805-370-2396 (SAMO) -- Rodney Sparapani, PhD Center for Patient Care and Outcomes Research Sr. Biostatistician http://www.mcw.edu/pcor 4 wheels good, 2 wheels better! Medical College of Wisconsin (MCW) WWLD?: What Would Lombardi Do? Milwaukee, WI, USA |