Different ESS in MLwiN and R2MLwiN
Posted: Fri Jul 13, 2018 4:21 pm
I'm getting quite different ESS scores in my models comparing R2MLwiN and MLwiN, using the same models and data.
With MLwiN, I get the following results:
And in R2MlwiN I'm getting the following:
The latter was made with the following code:
So for my purposes, the problematic one (in R2MLwiN) is the ESS associated with the age-gm term.
The variables are all the same (and centred the same), both models are cross-classified and have hierarchical centring specified. Both have starting values from IGLS and long burn ins (500k) and chains (1mil). I haven't messed with the default priors. Is there a default that might be different with one and not the other?
Thanks!
With MLwiN, I get the following results:
Code: Select all
model S.E. ESS
Response deaths
Fixed Part
cons -2.227 0.028 1159
(age-gm) 0.048 0.001 511
(age-gm)^2 0.001 0.000 18439
(year-gm) -0.031 0.001 512
Random Part
Level: birth_year
Var(cons) 0.044 0.006 910595
Level: year
Var(cons) 0.031 0.005 830212
Level: c1
Var(cons)
Var(bcons.1) 1.000 0.000 0
Units: birth_year 101
Units: year 95
Units: c1 6163
Estimation: MCMC
DIC: 3558279.237
pD: 195.819
Burnin: 500000
Chain Length: 1000000
Thinning: 1
Code: Select all
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
MLwiN (version: 3.01) multilevel model (Poisson)
N min mean max N_complete min_complete mean_complete max_complete
year 95 23 64.87368 91 95 23 64.87368 91
birth_year 101 17 61.01980 91 101 17 61.01980 91
Estimation algorithm: MCMC Cross-classified Elapsed time : 1729.97s
Number of obs: 6163 (from total 6163) Number of iter.: 1e+06 Chains: 1 Burn-in: 5e+05
Bayesian Deviance Information Criterion (DIC)
Dbar D(thetabar) pD DIC
3558095.934 3557900.101 195.833 3558291.767
---------------------------------------------------------------------------------------------------
The model formula:
log(deaths) ~ 1 + offset(logexp) + agec + agec2 + yearc + (1 |
year) + (1 | birth_year)
Level 3: year Level 2: birth_year Level 1: l1id
---------------------------------------------------------------------------------------------------
The fixed part estimates:
Coef. Std. Err. z Pr(>|z|) [95% Cred. Interval] ESS
Intercept -2.20986 0.02754 -80.25 0 *** -2.26254 -2.15503 471
agec 0.04807 0.00060 80.17 0 *** 0.04703 0.04927 20
agec2 0.00122 0.00000 2277.38 0 *** 0.00122 0.00122 16221
yearc -0.03163 0.00089 -35.61 1.063e-277 *** -0.03339 -0.02993 728
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
---------------------------------------------------------------------------------------------------
The random part estimates at the year level:
Coef. Std. Err. [95% Cred. Interval] ESS
var_Intercept 0.03078 0.00462 0.02303 0.04107 954338
---------------------------------------------------------------------------------------------------
The random part estimates at the birth_year level:
Coef. Std. Err. [95% Cred. Interval] ESS
var_Intercept 0.04389 0.00639 0.03311 0.05806 178671
---------------------------------------------------------------------------------------------------
The random part estimates at the l1id level:
Coef. Std. Err. [95% Cred. Interval] ESS
var_bcons_1 1.00000 0.00000 1.00000 1.00000 1e+06
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Code: Select all
model1 <- runMLwiN(log(deaths) ~ 1 + offset(logexp) + agec + agec2 +
yearc + (1 | year) + (1 | birth_year), D= "Poisson",
estoptions = list(xc = TRUE, EstM = 1,
mcmcOptions = list(hcen = 3),
mcmcMeth = list(burnin=500000, iterations=1000000)
),
data=UK_fem2)
The variables are all the same (and centred the same), both models are cross-classified and have hierarchical centring specified. Both have starting values from IGLS and long burn ins (500k) and chains (1mil). I haven't messed with the default priors. Is there a default that might be different with one and not the other?
Thanks!