R version 4.4.1 (2024-06-14 ucrt) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ############################################################################ > # MLwiN MCMC Manual > # > # 3 Variance Components Models . . . . . . . . . . . . . . . . . . . . .35 > # > # Browne, W.J. (2009) MCMC Estimation in MLwiN, v2.13. Centre for > # Multilevel Modelling, University of Bristol. > ############################################################################ > # R script to replicate all analyses using R2MLwiN > # > # Zhang, Z., Charlton, C., Parker, R, Leckie, G., and Browne, W.J. > # Centre for Multilevel Modelling, 2012 > # http://www.bristol.ac.uk/cmm/software/R2MLwiN/ > ############################################################################ > > # 3.1 A 2 level variance components model for the Tutorial dataset . . . .36 > > library(R2MLwiN) R2MLwiN: A package to run models implemented in MLwiN from R Copyright 2013-2024 Zhengzheng Zhang, Christopher M. J. Charlton, Richard M. A. Parker, William J. Browne and George Leckie Support provided by the Economic and Social Research Council (ESRC) (Grants RES-149-25-1084, RES-576-25-0032 and ES/K007246/1) To cite R2MLwiN in publications use: Zhengzheng Zhang, Richard M. A. Parker, Christopher M. J. Charlton, George Leckie, William J. Browne (2016). R2MLwiN: A Package to Run MLwiN from within R. Journal of Statistical Software, 72(10), 1-43. doi:10.18637/jss.v072.i10 A BibTeX entry for LaTeX users is @Article{, title = {{R2MLwiN}: A Package to Run {MLwiN} from within {R}}, author = {Zhengzheng Zhang and Richard M. A. Parker and Christopher M. J. Charlton and George Leckie and William J. Browne}, journal = {Journal of Statistical Software}, year = {2016}, volume = {72}, number = {10}, pages = {1--43}, doi = {10.18637/jss.v072.i10}, } The MLwiN_path option is currently set to C:/Program Files/MLwiN v3.11/ To change this use: options(MLwiN_path="") > # MLwiN folder > mlwin <- getOption("MLwiN_path") > while (!file.access(mlwin, mode = 1) == 0) { + cat("Please specify the root MLwiN folder or the full path to the MLwiN executable:\n") + mlwin <- scan(what = character(0), sep = "\n") + mlwin <- gsub("\\", "/", mlwin, fixed = TRUE) + } > options(MLwiN_path = mlwin) > > ## save current par settings > mypar <- par(no.readonly = TRUE) > > ## Read tutorial data > data(tutorial, package = "R2MLwiN") > > ## The highest level comes first, then the second highest and so on > (mymodel1 <- runMLwiN(normexam ~ 1 + standlrt + (1 | school) + (1 | student), estoptions = list(EstM = 1), data = tutorial)) MLwiN is running, please wait...... /nogui option ignored ECHO 0 Echoing is ON BATC 1 Batch mode is ON MAXI 2 STAR iteration 0 iteration 1 Convergence not achieved TOLE 2 MAXI 20 BATC 1 Batch mode is ON NEXT iteration 2 iteration 3 Convergence achieved ECHO 0 Echoing is ON MCMC 0 500 1 5.8 50 10 G30[1] G30[2] 1 1 1 1 1 1 BURNING IN... Burning in for 50 iterations out of 500 -2 * Loglike = 9206.193266 Burning in for 100 iterations out of 500 -2 * Loglike = 9216.262176 Burning in for 150 iterations out of 500 -2 * Loglike = 9241.057582 Burning in for 200 iterations out of 500 -2 * Loglike = 9214.675885 Burning in for 250 iterations out of 500 -2 * Loglike = 9198.255145 Burning in for 300 iterations out of 500 -2 * Loglike = 9227.186873 Burning in for 350 iterations out of 500 -2 * Loglike = 9222.091977 Burning in for 400 iterations out of 500 -2 * Loglike = 9214.630238 Burning in for 450 iterations out of 500 -2 * Loglike = 9216.522216 Burning in for 500 iterations out of 500 -2 * Loglike = 9201.148603 ERAS G30 LINK 0 G30 ERAS c1090 c1091 MCMC 1 5000 1 c1090 c1091 c1003 c1004 1 1 Actual update 50 of 5000, Stored update 50 of 5000 -2 * Loglike = 9212.190791 Actual update 100 of 5000, Stored update 100 of 5000 -2 * Loglike = 9208.377297 Actual update 150 of 5000, Stored update 150 of 5000 -2 * Loglike = 9207.886882 Actual update 200 of 5000, Stored update 200 of 5000 -2 * Loglike = 9195.385976 Actual update 250 of 5000, Stored update 250 of 5000 -2 * Loglike = 9238.483062 Actual update 300 of 5000, Stored update 300 of 5000 -2 * Loglike = 9215.621742 Actual update 350 of 5000, Stored update 350 of 5000 -2 * Loglike = 9205.716499 Actual update 400 of 5000, Stored update 400 of 5000 -2 * Loglike = 9207.158850 Actual update 450 of 5000, Stored update 450 of 5000 -2 * Loglike = 9210.248427 Actual update 500 of 5000, Stored update 500 of 5000 -2 * Loglike = 9228.495732 Actual update 550 of 5000, Stored update 550 of 5000 -2 * Loglike = 9221.683303 Actual update 600 of 5000, Stored update 600 of 5000 -2 * Loglike = 9202.166694 Actual update 650 of 5000, Stored update 650 of 5000 -2 * Loglike = 9237.981658 Actual update 700 of 5000, Stored update 700 of 5000 -2 * Loglike = 9201.878383 Actual update 750 of 5000, Stored update 750 of 5000 -2 * Loglike = 9198.726654 Actual update 800 of 5000, Stored update 800 of 5000 -2 * Loglike = 9214.104227 Actual update 850 of 5000, Stored update 850 of 5000 -2 * Loglike = 9227.156460 Actual update 900 of 5000, Stored update 900 of 5000 -2 * Loglike = 9197.279082 Actual update 950 of 5000, Stored update 950 of 5000 -2 * Loglike = 9191.816267 Actual update 1000 of 5000, Stored update 1000 of 5000 -2 * Loglike = 9219.178731 Actual update 1050 of 5000, Stored update 1050 of 5000 -2 * Loglike = 9214.163387 Actual update 1100 of 5000, Stored update 1100 of 5000 -2 * Loglike = 9218.308723 Actual update 1150 of 5000, Stored update 1150 of 5000 -2 * Loglike = 9188.214048 Actual update 1200 of 5000, Stored update 1200 of 5000 -2 * Loglike = 9188.278770 Actual update 1250 of 5000, Stored update 1250 of 5000 -2 * Loglike = 9208.819913 Actual update 1300 of 5000, Stored update 1300 of 5000 -2 * Loglike = 9193.939811 Actual update 1350 of 5000, Stored update 1350 of 5000 -2 * Loglike = 9193.651680 Actual update 1400 of 5000, Stored update 1400 of 5000 -2 * Loglike = 9215.606479 Actual update 1450 of 5000, Stored update 1450 of 5000 -2 * Loglike = 9195.925780 Actual update 1500 of 5000, Stored update 1500 of 5000 -2 * Loglike = 9218.422125 Actual update 1550 of 5000, Stored update 1550 of 5000 -2 * Loglike = 9202.244183 Actual update 1600 of 5000, Stored update 1600 of 5000 -2 * Loglike = 9204.907738 Actual update 1650 of 5000, Stored update 1650 of 5000 -2 * Loglike = 9194.883902 Actual update 1700 of 5000, Stored update 1700 of 5000 -2 * Loglike = 9214.140517 Actual update 1750 of 5000, Stored update 1750 of 5000 -2 * Loglike = 9211.397609 Actual update 1800 of 5000, Stored update 1800 of 5000 -2 * Loglike = 9207.941176 Actual update 1850 of 5000, Stored update 1850 of 5000 -2 * Loglike = 9216.158993 Actual update 1900 of 5000, Stored update 1900 of 5000 -2 * Loglike = 9216.821254 Actual update 1950 of 5000, Stored update 1950 of 5000 -2 * Loglike = 9209.099646 Actual update 2000 of 5000, Stored update 2000 of 5000 -2 * Loglike = 9205.356036 Actual update 2050 of 5000, Stored update 2050 of 5000 -2 * Loglike = 9226.820798 Actual update 2100 of 5000, Stored update 2100 of 5000 -2 * Loglike = 9215.889068 Actual update 2150 of 5000, Stored update 2150 of 5000 -2 * Loglike = 9204.485567 Actual update 2200 of 5000, Stored update 2200 of 5000 -2 * Loglike = 9239.773102 Actual update 2250 of 5000, Stored update 2250 of 5000 -2 * Loglike = 9204.613020 Actual update 2300 of 5000, Stored update 2300 of 5000 -2 * Loglike = 9205.832435 Actual update 2350 of 5000, Stored update 2350 of 5000 -2 * Loglike = 9197.787494 Actual update 2400 of 5000, Stored update 2400 of 5000 -2 * Loglike = 9202.635017 Actual update 2450 of 5000, Stored update 2450 of 5000 -2 * Loglike = 9202.243753 Actual update 2500 of 5000, Stored update 2500 of 5000 -2 * Loglike = 9199.686027 Actual update 2550 of 5000, Stored update 2550 of 5000 -2 * Loglike = 9213.435702 Actual update 2600 of 5000, Stored update 2600 of 5000 -2 * Loglike = 9215.862131 Actual update 2650 of 5000, Stored update 2650 of 5000 -2 * Loglike = 9203.440604 Actual update 2700 of 5000, Stored update 2700 of 5000 -2 * Loglike = 9197.917390 Actual update 2750 of 5000, Stored update 2750 of 5000 -2 * Loglike = 9225.824248 Actual update 2800 of 5000, Stored update 2800 of 5000 -2 * Loglike = 9222.623770 Actual update 2850 of 5000, Stored update 2850 of 5000 -2 * Loglike = 9226.897380 Actual update 2900 of 5000, Stored update 2900 of 5000 -2 * Loglike = 9197.383677 Actual update 2950 of 5000, Stored update 2950 of 5000 -2 * Loglike = 9211.390320 Actual update 3000 of 5000, Stored update 3000 of 5000 -2 * Loglike = 9207.286579 Actual update 3050 of 5000, Stored update 3050 of 5000 -2 * Loglike = 9217.534200 Actual update 3100 of 5000, Stored update 3100 of 5000 -2 * Loglike = 9227.872396 Actual update 3150 of 5000, Stored update 3150 of 5000 -2 * Loglike = 9198.935844 Actual update 3200 of 5000, Stored update 3200 of 5000 -2 * Loglike = 9203.578259 Actual update 3250 of 5000, Stored update 3250 of 5000 -2 * Loglike = 9193.257434 Actual update 3300 of 5000, Stored update 3300 of 5000 -2 * Loglike = 9204.815469 Actual update 3350 of 5000, Stored update 3350 of 5000 -2 * Loglike = 9200.291358 Actual update 3400 of 5000, Stored update 3400 of 5000 -2 * Loglike = 9219.578031 Actual update 3450 of 5000, Stored update 3450 of 5000 -2 * Loglike = 9214.657834 Actual update 3500 of 5000, Stored update 3500 of 5000 -2 * Loglike = 9213.144417 Actual update 3550 of 5000, Stored update 3550 of 5000 -2 * Loglike = 9217.997575 Actual update 3600 of 5000, Stored update 3600 of 5000 -2 * Loglike = 9225.109666 Actual update 3650 of 5000, Stored update 3650 of 5000 -2 * Loglike = 9212.063094 Actual update 3700 of 5000, Stored update 3700 of 5000 -2 * Loglike = 9226.746381 Actual update 3750 of 5000, Stored update 3750 of 5000 -2 * Loglike = 9214.159422 Actual update 3800 of 5000, Stored update 3800 of 5000 -2 * Loglike = 9204.966122 Actual update 3850 of 5000, Stored update 3850 of 5000 -2 * Loglike = 9190.735716 Actual update 3900 of 5000, Stored update 3900 of 5000 -2 * Loglike = 9206.324394 Actual update 3950 of 5000, Stored update 3950 of 5000 -2 * Loglike = 9205.512200 Actual update 4000 of 5000, Stored update 4000 of 5000 -2 * Loglike = 9201.017143 Actual update 4050 of 5000, Stored update 4050 of 5000 -2 * Loglike = 9211.234780 Actual update 4100 of 5000, Stored update 4100 of 5000 -2 * Loglike = 9211.765768 Actual update 4150 of 5000, Stored update 4150 of 5000 -2 * Loglike = 9200.968089 Actual update 4200 of 5000, Stored update 4200 of 5000 -2 * Loglike = 9229.231239 Actual update 4250 of 5000, Stored update 4250 of 5000 -2 * Loglike = 9207.636298 Actual update 4300 of 5000, Stored update 4300 of 5000 -2 * Loglike = 9197.507235 Actual update 4350 of 5000, Stored update 4350 of 5000 -2 * Loglike = 9208.445006 Actual update 4400 of 5000, Stored update 4400 of 5000 -2 * Loglike = 9231.667774 Actual update 4450 of 5000, Stored update 4450 of 5000 -2 * Loglike = 9201.470719 Actual update 4500 of 5000, Stored update 4500 of 5000 -2 * Loglike = 9208.425209 Actual update 4550 of 5000, Stored update 4550 of 5000 -2 * Loglike = 9216.996959 Actual update 4600 of 5000, Stored update 4600 of 5000 -2 * Loglike = 9225.405793 Actual update 4650 of 5000, Stored update 4650 of 5000 -2 * Loglike = 9201.746288 Actual update 4700 of 5000, Stored update 4700 of 5000 -2 * Loglike = 9212.656436 Actual update 4750 of 5000, Stored update 4750 of 5000 -2 * Loglike = 9202.976127 Actual update 4800 of 5000, Stored update 4800 of 5000 -2 * Loglike = 9218.846042 Actual update 4850 of 5000, Stored update 4850 of 5000 -2 * Loglike = 9200.637551 Actual update 4900 of 5000, Stored update 4900 of 5000 -2 * Loglike = 9219.146880 Actual update 4950 of 5000, Stored update 4950 of 5000 -2 * Loglike = 9215.841845 Actual update 5000 of 5000, Stored update 5000 of 5000 -2 * Loglike = 9212.109834 PUPN c1003 c1004 AVER c1091 b99 b100 Count = 5000 Average = 9209.1 S.D. = 11.916 S.E.M. = 0.16852 ECHO 0 Execution completed -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MLwiN (version: 3.11) multilevel model (Normal) N min mean max N_complete min_complete mean_complete max_complete school 65 2 62.44615 198 65 2 62.44615 198 Estimation algorithm: MCMC Elapsed time : 1.45s Number of obs: 4059 (from total 4059) Number of iter.: 5000 Chains: 1 Burn-in: 500 Bayesian Deviance Information Criterion (DIC) Dbar D(thetabar) pD DIC 9209.078 9149.069 60.010 9269.088 --------------------------------------------------------------------------------------------------- The model formula: normexam ~ 1 + standlrt + (1 | school) + (1 | student) Level 2: school Level 1: student --------------------------------------------------------------------------------------------------- The fixed part estimates: Coef. Std. Err. z Pr(>|z|) [95% Cred. Interval] ESS Intercept 0.00318 0.04420 0.07 0.9427 -0.08330 0.09189 223 standlrt 0.56322 0.01258 44.77 0 *** 0.53844 0.58780 3821 Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 --------------------------------------------------------------------------------------------------- The random part estimates at the school level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.09742 0.01988 0.06472 0.14144 3126 --------------------------------------------------------------------------------------------------- The random part estimates at the student level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.56617 0.01249 0.54212 0.59090 4751 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- > > if (!require(coda)) { + warning("package coda required to run this example") + } else { + estimates <- mymodel1@chains + par(mfrow = c(3, 2)) + plot(4501:niter(estimates), estimates[4501:niter(estimates), "deviance"], xlab = "iteration", ylab = expression(paste("Est. of deviance")), + type = "l") + plot(4501:niter(estimates), estimates[4501:niter(estimates), "FP_Intercept"], xlab = "iteration", ylab = expression(paste("Est. of ", + beta[0])), type = "l") + plot(4501:niter(estimates), estimates[4501:niter(estimates), "FP_standlrt"], xlab = "iteration", ylab = expression(paste("Est. of ", + beta[1])), type = "l") + plot(4501:niter(estimates), estimates[4501:niter(estimates), "RP2_var_Intercept"], xlab = "iteration", ylab = expression(paste("Est. of ", + sigma[u0]^2)), type = "l") + plot(4501:niter(estimates), estimates[4501:niter(estimates), "RP1_var_Intercept"], xlab = "iteration", ylab = expression(paste("Est. of ", + sigma[e0]^2)), type = "l") + ## reinstate par settings + par(mypar) + } Loading required package: coda > > sixway(mymodel1@chains[, "FP_standlrt", drop = FALSE], "beta_1") > sixway(mymodel1@chains[, "RP2_var_Intercept", drop = FALSE], "sigma2u0") > > # 3.2 DIC and multilevel models . . . . . . . . . . . . . . . . . . . . . 41 > > # 3.3 Comparison between fixed and random school effects . . . . . . . . .41 > > (mymodel2 <- runMLwiN(normexam ~ 1 + standlrt + sex + (1 | school) + (1 | student), estoptions = list(EstM = 1), data = tutorial)) MLwiN is running, please wait...... /nogui option ignored ECHO 0 Echoing is ON BATC 1 Batch mode is ON MAXI 2 STAR iteration 0 iteration 1 Convergence not achieved TOLE 2 MAXI 20 BATC 1 Batch mode is ON NEXT iteration 2 iteration 3 Convergence achieved ECHO 0 Echoing is ON MCMC 0 500 1 5.8 50 10 G30[1] G30[2] 1 1 1 1 1 1 BURNING IN... Burning in for 50 iterations out of 500 -2 * Loglike = 9180.759474 Burning in for 100 iterations out of 500 -2 * Loglike = 9194.936175 Burning in for 150 iterations out of 500 -2 * Loglike = 9187.579234 Burning in for 200 iterations out of 500 -2 * Loglike = 9185.806609 Burning in for 250 iterations out of 500 -2 * Loglike = 9164.048048 Burning in for 300 iterations out of 500 -2 * Loglike = 9200.472585 Burning in for 350 iterations out of 500 -2 * Loglike = 9186.465078 Burning in for 400 iterations out of 500 -2 * Loglike = 9185.695711 Burning in for 450 iterations out of 500 -2 * Loglike = 9185.352829 Burning in for 500 iterations out of 500 -2 * Loglike = 9170.684757 ERAS G30 LINK 0 G30 ERAS c1090 c1091 MCMC 1 5000 1 c1090 c1091 c1003 c1004 1 1 Actual update 50 of 5000, Stored update 50 of 5000 -2 * Loglike = 9176.157668 Actual update 100 of 5000, Stored update 100 of 5000 -2 * Loglike = 9177.537683 Actual update 150 of 5000, Stored update 150 of 5000 -2 * Loglike = 9176.378814 Actual update 200 of 5000, Stored update 200 of 5000 -2 * Loglike = 9192.734381 Actual update 250 of 5000, Stored update 250 of 5000 -2 * Loglike = 9178.641230 Actual update 300 of 5000, Stored update 300 of 5000 -2 * Loglike = 9187.957823 Actual update 350 of 5000, Stored update 350 of 5000 -2 * Loglike = 9181.903814 Actual update 400 of 5000, Stored update 400 of 5000 -2 * Loglike = 9185.364941 Actual update 450 of 5000, Stored update 450 of 5000 -2 * Loglike = 9199.610013 Actual update 500 of 5000, Stored update 500 of 5000 -2 * Loglike = 9189.268670 Actual update 550 of 5000, Stored update 550 of 5000 -2 * Loglike = 9209.801948 Actual update 600 of 5000, Stored update 600 of 5000 -2 * Loglike = 9180.779542 Actual update 650 of 5000, Stored update 650 of 5000 -2 * Loglike = 9173.861211 Actual update 700 of 5000, Stored update 700 of 5000 -2 * Loglike = 9172.928569 Actual update 750 of 5000, Stored update 750 of 5000 -2 * Loglike = 9183.393326 Actual update 800 of 5000, Stored update 800 of 5000 -2 * Loglike = 9179.348545 Actual update 850 of 5000, Stored update 850 of 5000 -2 * Loglike = 9172.648377 Actual update 900 of 5000, Stored update 900 of 5000 -2 * Loglike = 9195.617996 Actual update 950 of 5000, Stored update 950 of 5000 -2 * Loglike = 9205.457222 Actual update 1000 of 5000, Stored update 1000 of 5000 -2 * Loglike = 9191.330991 Actual update 1050 of 5000, Stored update 1050 of 5000 -2 * Loglike = 9180.848291 Actual update 1100 of 5000, Stored update 1100 of 5000 -2 * Loglike = 9185.070892 Actual update 1150 of 5000, Stored update 1150 of 5000 -2 * Loglike = 9178.832408 Actual update 1200 of 5000, Stored update 1200 of 5000 -2 * Loglike = 9185.923629 Actual update 1250 of 5000, Stored update 1250 of 5000 -2 * Loglike = 9194.042353 Actual update 1300 of 5000, Stored update 1300 of 5000 -2 * Loglike = 9176.993023 Actual update 1350 of 5000, Stored update 1350 of 5000 -2 * Loglike = 9172.469997 Actual update 1400 of 5000, Stored update 1400 of 5000 -2 * Loglike = 9188.060318 Actual update 1450 of 5000, Stored update 1450 of 5000 -2 * Loglike = 9174.465939 Actual update 1500 of 5000, Stored update 1500 of 5000 -2 * Loglike = 9184.455528 Actual update 1550 of 5000, Stored update 1550 of 5000 -2 * Loglike = 9183.920528 Actual update 1600 of 5000, Stored update 1600 of 5000 -2 * Loglike = 9180.265754 Actual update 1650 of 5000, Stored update 1650 of 5000 -2 * Loglike = 9166.758748 Actual update 1700 of 5000, Stored update 1700 of 5000 -2 * Loglike = 9166.632713 Actual update 1750 of 5000, Stored update 1750 of 5000 -2 * Loglike = 9173.641321 Actual update 1800 of 5000, Stored update 1800 of 5000 -2 * Loglike = 9183.756578 Actual update 1850 of 5000, Stored update 1850 of 5000 -2 * Loglike = 9190.756780 Actual update 1900 of 5000, Stored update 1900 of 5000 -2 * Loglike = 9168.070877 Actual update 1950 of 5000, Stored update 1950 of 5000 -2 * Loglike = 9196.328847 Actual update 2000 of 5000, Stored update 2000 of 5000 -2 * Loglike = 9184.172946 Actual update 2050 of 5000, Stored update 2050 of 5000 -2 * Loglike = 9194.382577 Actual update 2100 of 5000, Stored update 2100 of 5000 -2 * Loglike = 9186.496012 Actual update 2150 of 5000, Stored update 2150 of 5000 -2 * Loglike = 9185.988565 Actual update 2200 of 5000, Stored update 2200 of 5000 -2 * Loglike = 9207.084202 Actual update 2250 of 5000, Stored update 2250 of 5000 -2 * Loglike = 9164.110860 Actual update 2300 of 5000, Stored update 2300 of 5000 -2 * Loglike = 9198.726158 Actual update 2350 of 5000, Stored update 2350 of 5000 -2 * Loglike = 9189.079324 Actual update 2400 of 5000, Stored update 2400 of 5000 -2 * Loglike = 9181.380599 Actual update 2450 of 5000, Stored update 2450 of 5000 -2 * Loglike = 9174.884741 Actual update 2500 of 5000, Stored update 2500 of 5000 -2 * Loglike = 9184.897798 Actual update 2550 of 5000, Stored update 2550 of 5000 -2 * Loglike = 9190.049555 Actual update 2600 of 5000, Stored update 2600 of 5000 -2 * Loglike = 9184.983257 Actual update 2650 of 5000, Stored update 2650 of 5000 -2 * Loglike = 9214.742018 Actual update 2700 of 5000, Stored update 2700 of 5000 -2 * Loglike = 9175.660733 Actual update 2750 of 5000, Stored update 2750 of 5000 -2 * Loglike = 9197.831055 Actual update 2800 of 5000, Stored update 2800 of 5000 -2 * Loglike = 9203.639129 Actual update 2850 of 5000, Stored update 2850 of 5000 -2 * Loglike = 9174.998741 Actual update 2900 of 5000, Stored update 2900 of 5000 -2 * Loglike = 9173.891806 Actual update 2950 of 5000, Stored update 2950 of 5000 -2 * Loglike = 9199.362923 Actual update 3000 of 5000, Stored update 3000 of 5000 -2 * Loglike = 9203.856872 Actual update 3050 of 5000, Stored update 3050 of 5000 -2 * Loglike = 9185.742975 Actual update 3100 of 5000, Stored update 3100 of 5000 -2 * Loglike = 9165.513302 Actual update 3150 of 5000, Stored update 3150 of 5000 -2 * Loglike = 9203.342257 Actual update 3200 of 5000, Stored update 3200 of 5000 -2 * Loglike = 9184.428113 Actual update 3250 of 5000, Stored update 3250 of 5000 -2 * Loglike = 9174.399175 Actual update 3300 of 5000, Stored update 3300 of 5000 -2 * Loglike = 9171.479516 Actual update 3350 of 5000, Stored update 3350 of 5000 -2 * Loglike = 9206.142037 Actual update 3400 of 5000, Stored update 3400 of 5000 -2 * Loglike = 9197.502331 Actual update 3450 of 5000, Stored update 3450 of 5000 -2 * Loglike = 9183.319756 Actual update 3500 of 5000, Stored update 3500 of 5000 -2 * Loglike = 9189.010430 Actual update 3550 of 5000, Stored update 3550 of 5000 -2 * Loglike = 9174.162962 Actual update 3600 of 5000, Stored update 3600 of 5000 -2 * Loglike = 9176.038065 Actual update 3650 of 5000, Stored update 3650 of 5000 -2 * Loglike = 9180.309976 Actual update 3700 of 5000, Stored update 3700 of 5000 -2 * Loglike = 9183.346059 Actual update 3750 of 5000, Stored update 3750 of 5000 -2 * Loglike = 9182.923896 Actual update 3800 of 5000, Stored update 3800 of 5000 -2 * Loglike = 9185.798041 Actual update 3850 of 5000, Stored update 3850 of 5000 -2 * Loglike = 9175.323611 Actual update 3900 of 5000, Stored update 3900 of 5000 -2 * Loglike = 9174.447300 Actual update 3950 of 5000, Stored update 3950 of 5000 -2 * Loglike = 9218.371065 Actual update 4000 of 5000, Stored update 4000 of 5000 -2 * Loglike = 9191.127280 Actual update 4050 of 5000, Stored update 4050 of 5000 -2 * Loglike = 9181.126277 Actual update 4100 of 5000, Stored update 4100 of 5000 -2 * Loglike = 9179.989149 Actual update 4150 of 5000, Stored update 4150 of 5000 -2 * Loglike = 9175.175701 Actual update 4200 of 5000, Stored update 4200 of 5000 -2 * Loglike = 9173.305779 Actual update 4250 of 5000, Stored update 4250 of 5000 -2 * Loglike = 9173.133160 Actual update 4300 of 5000, Stored update 4300 of 5000 -2 * Loglike = 9200.045570 Actual update 4350 of 5000, Stored update 4350 of 5000 -2 * Loglike = 9172.694855 Actual update 4400 of 5000, Stored update 4400 of 5000 -2 * Loglike = 9202.816875 Actual update 4450 of 5000, Stored update 4450 of 5000 -2 * Loglike = 9179.815774 Actual update 4500 of 5000, Stored update 4500 of 5000 -2 * Loglike = 9195.059292 Actual update 4550 of 5000, Stored update 4550 of 5000 -2 * Loglike = 9162.811273 Actual update 4600 of 5000, Stored update 4600 of 5000 -2 * Loglike = 9170.468640 Actual update 4650 of 5000, Stored update 4650 of 5000 -2 * Loglike = 9174.009061 Actual update 4700 of 5000, Stored update 4700 of 5000 -2 * Loglike = 9181.578007 Actual update 4750 of 5000, Stored update 4750 of 5000 -2 * Loglike = 9189.562303 Actual update 4800 of 5000, Stored update 4800 of 5000 -2 * Loglike = 9207.423630 Actual update 4850 of 5000, Stored update 4850 of 5000 -2 * Loglike = 9190.410357 Actual update 4900 of 5000, Stored update 4900 of 5000 -2 * Loglike = 9173.421249 Actual update 4950 of 5000, Stored update 4950 of 5000 -2 * Loglike = 9208.411353 Actual update 5000 of 5000, Stored update 5000 of 5000 -2 * Loglike = 9172.282289 PUPN c1003 c1004 AVER c1091 b99 b100 Count = 5000 Average = 9185.2 S.D. = 11.919 S.E.M. = 0.16856 ECHO 0 Execution completed -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MLwiN (version: 3.11) multilevel model (Normal) N min mean max N_complete min_complete mean_complete max_complete school 65 2 62.44615 198 65 2 62.44615 198 Estimation algorithm: MCMC Elapsed time : 1.5s Number of obs: 4059 (from total 4059) Number of iter.: 5000 Chains: 1 Burn-in: 500 Bayesian Deviance Information Criterion (DIC) Dbar D(thetabar) pD DIC 9185.221 9124.538 60.683 9245.904 --------------------------------------------------------------------------------------------------- The model formula: normexam ~ 1 + standlrt + sex + (1 | school) + (1 | student) Level 2: school Level 1: student --------------------------------------------------------------------------------------------------- The fixed part estimates: Coef. Std. Err. z Pr(>|z|) [95% Cred. Interval] ESS Intercept -0.09433 0.04571 -2.06 0.03904 * -0.18102 -0.00045 266 standlrt 0.55933 0.01275 43.88 0 *** 0.53403 0.58367 3876 sexgirl 0.17237 0.03324 5.19 2.157e-07 *** 0.10698 0.23877 1977 Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 --------------------------------------------------------------------------------------------------- The random part estimates at the school level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.09237 0.01919 0.06220 0.13543 2955 --------------------------------------------------------------------------------------------------- The random part estimates at the student level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.56314 0.01251 0.53890 0.58844 5000 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- > > # Chapter learning outcomes . . . . . . . . . . . . . . . . . . . . . . . 43 > > > > ############################################################################ > > proc.time() user system elapsed 4.18 0.37 7.90