------------------------------------------------------------------------------- name: log: Q:\C-modelling\runmlwin\website\logfiles\2020-03-27\16\3_Variance_ > Components_Models.smcl log type: smcl opened on: 27 Mar 2020, 17:44:14 . **************************************************************************** . * MLwiN MCMC Manual . * . * 3 Variance Components Models . . . . . . . . . . . . . . . . . . . . .35 . * . * Browne, W. J. (2009). MCMC Estimation in MLwiN, v2.26. Centre for . * Multilevel Modelling, University of Bristol. . **************************************************************************** . * Stata do-file to replicate all analyses using runmlwin . * . * George Leckie and Chris Charlton, . * Centre for Multilevel Modelling, 2012 . * http://www.bristol.ac.uk/cmm/software/runmlwin/ . **************************************************************************** . . * 3.1 A 2 level variance components model for the Tutorial dataset . . . .36 . . use "http://www.bristol.ac.uk/cmm/media/runmlwin/tutorial.dta", clear . . quietly runmlwin normexam cons standlrt, /// > level2(school: cons) /// > level1(student: cons) /// > nopause . . runmlwin normexam cons standlrt, /// > level2(school: cons) /// > level1(student: cons) /// > mcmc(on) initsprevious nopause MLwiN 3.05 multilevel model Number of obs = 4059 Normal response model (hierarchical) Estimation algorithm: MCMC ----------------------------------------------------------- | No. of Observations per Group Level Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ school | 65 2 62.4 198 ----------------------------------------------------------- Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 2.48 Deviance (dbar) = 9208.82 Deviance (thetabar) = 9148.97 Effective no. of pars (pd) = 59.85 Bayesian DIC = 9268.66 ------------------------------------------------------------------------------ normexam | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- cons | .0013325 .0421552 231 0.498 -.0776169 .0851904 standlrt | .5633124 .0125354 3916 0.000 .5389242 .5879933 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 2: school | var(cons) | .0973183 .02049 2828 .064413 .1445396 -----------------------------+------------------------------------------------ Level 1: student | var(cons) | .566342 .0126871 4913 .5417516 .5919709 ------------------------------------------------------------------------------ . . mcmcsum in 4501/5000, trajectories . . mcmcsum [FP1]standlrt, detail [FP1]standlrt ------------------------------------------------------------------------------ Percentiles Mean .5633124 0.5% .531562 Thinned Chain Length 5000 MCSE of Mean .0001978 2.5% .5389241 Effective Sample Size 3916 Std. Dev. .0125354 5% .5430173 Raftery Lewis (2.5%) 3803 Mode .5632343 25% .5547073 Raftery Lewis (97.5%) 4129 P(mean) 0.000 Brooks Draper (mean) 31 P(mode) 0.000 50% .5632238 P(median) 0.000 75% .5718236 95% .5841798 97.5% .5879933 99.5% .5952625 ------------------------------------------------------------------------------ . . mcmcsum [FP1]standlrt, fiveway . . mcmcsum [RP2]var(cons), detail [RP2]var(cons) ------------------------------------------------------------------------------ Percentiles Mean .0973183 0.5% .057521 Thinned Chain Length 5000 MCSE of Mean .0003753 2.5% .064413 Effective Sample Size 2828 Std. Dev. .02049 5% .0688548 Raftery Lewis (2.5%) 4484 Mode .0917529 25% .0827398 Raftery Lewis (97.5%) 4129 P(mean) 0.000 Brooks Draper (mean) 10819 P(mode) 0.000 50% .0948958 P(median) 0.000 75% .1092218 95% .1347807 97.5% .1445396 99.5% .1651094 ------------------------------------------------------------------------------ . . mcmcsum [RP2]var(cons), fiveway . . . . * 3.2 DIC and multilevel models . . . . . . . . . . . . . . . . . . . . . 41 . . . . * 3.3 Comparison between fixed and random school effects . . . . . . . . .41 . . quietly runmlwin normexam cons standlrt girl, /// > level2(school: cons) /// > level1(student: cons) /// > nopause . . runmlwin normexam cons standlrt girl, /// > level2(school: cons) /// > level1(student: cons) /// > mcmc(on) initsprevious nopause MLwiN 3.05 multilevel model Number of obs = 4059 Normal response model (hierarchical) Estimation algorithm: MCMC ----------------------------------------------------------- | No. of Observations per Group Level Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ school | 65 2 62.4 198 ----------------------------------------------------------- Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 2.66 Deviance (dbar) = 9184.68 Deviance (thetabar) = 9124.28 Effective no. of pars (pd) = 60.40 Bayesian DIC = 9245.08 ------------------------------------------------------------------------------ normexam | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- cons | -.0964867 .042603 315 0.013 -.1789353 -.0106159 standlrt | .559356 .0125826 3995 0.000 .5351567 .5836991 girl | .1706655 .0323267 1862 0.000 .1079498 .2337549 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 2: school | var(cons) | .0927945 .0192658 3157 .0623877 .1357597 -----------------------------+------------------------------------------------ Level 1: student | var(cons) | .5630992 .0127991 4414 .5388025 .5888625 ------------------------------------------------------------------------------ . . . . * Chapter learning outcomes . . . . . . . . . . . . . . . . . . . . . . . 43 . . . . . . **************************************************************************** . exit end of do-file