------------------------------------------------------------------------------- name: log: Q:\C-modelling\runmlwin\website\logfiles\2020-03-27\16\18_Multivar > iate_Normal_Response_Models_and_Missing_Data.smcl log type: smcl opened on: 27 Mar 2020, 18:01:25 . **************************************************************************** . * MLwiN MCMC Manual . * . * 18 Multivariate Normal Response Models and Missing Data . . . . . . . 263 . * . * 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/ . **************************************************************************** . . * 18.1 GCSE science data with complete records only . . . . . . . . . . .264 . . use "http://www.bristol.ac.uk/cmm/media/runmlwin/gcsecomp1.dta", clear . . describe Contains data from http://www.bristol.ac.uk/cmm/media/runmlwin/gcsecomp1.dta obs: 1,523 vars: 6 21 Oct 2011 12:19 ------------------------------------------------------------------------------- storage display value variable name type format label variable label ------------------------------------------------------------------------------- school float %9.0g student int %9.0g female byte %9.0g written float %9.0g csework float %9.0g cons byte %9.0g ------------------------------------------------------------------------------- Sorted by: . . summarize written csework Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- written | 1,523 46.93697 13.49231 .625 90 csework | 1,523 73.42902 16.43633 9.2593 100 . . corr written csework (obs=1,523) | written csework -------------+------------------ written | 1.0000 csework | 0.4749 1.0000 . . . . * 18.2 Fitting single level multivariate models . . . . . . . . . . . . .265 . . runmlwin /// > (written cons, eq(1)) /// > (csework cons, eq(2)), /// > level1(student: (cons, eq(1)) (cons, eq(2))) /// > nosort nopause MLwiN 3.05 multilevel model Number of obs = 1523 Multivariate response model (hierarchical) Estimation algorithm: IGLS Run time (seconds) = 0.73 Number of iterations = 2 Log likelihood = -12353.119 Deviance = 24706.238 ------------------------------------------------------------------------------ | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- written | cons_1 | 46.93697 .345616 135.81 0.000 46.25957 47.61436 -------------+---------------------------------------------------------------- csework | cons_2 | 73.42902 .4210292 174.40 0.000 72.60382 74.25423 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ Level 1: student | var(cons_1) | 181.923 6.592539 169.0019 194.8442 cov(cons_1,cons_2) | 105.2477 6.286644 92.92612 117.5693 var(cons_2) | 269.9755 9.78339 250.8004 289.1506 ------------------------------------------------------------------------------ . . runmlwin /// > (written cons, eq(1)) /// > (csework cons, eq(2)), /// > level1(student: (cons, eq(1)) (cons, eq(2))) /// > mcmc(on) initsprevious nosort nopause MLwiN 3.05 multilevel model Number of obs = 1523 Multivariate response model (hierarchical) Estimation algorithm: MCMC Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 2.49 Deviance (dbar) = 24711.21 Deviance (thetabar) = 24706.25 Effective no. of pars (pd) = 4.97 Bayesian DIC = 24716.18 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- written | cons_1 | 46.93472 .3402943 5466 0.000 46.27051 47.58569 -------------+---------------------------------------------------------------- csework | cons_2 | 73.43046 .4204791 5054 0.000 72.62514 74.27575 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 1: student | var(cons_1) | 182.4126 6.558388 4639 170.0448 195.7545 cov(cons_1,cons_2) | 105.3958 6.275794 4966 93.48509 118.3385 var(cons_2) | 270.2499 9.850766 5333 251.839 290.3853 ------------------------------------------------------------------------------ . . . . * 18.3 Adding predictor variables . . . . . . . . . . . . . . . . . . . .270 . . quietly runmlwin /// > (written cons female, eq(1)) /// > (csework cons female, eq(2)), /// > level1(student: (cons, eq(1)) (cons, eq(2))) /// > nosort nopause . . runmlwin /// > (written cons female, eq(1)) /// > (csework cons female, eq(2)), /// > level1(student: (cons, eq(1)) (cons, eq(2))) /// > mcmc(on) initsprevious nosort nopause MLwiN 3.05 multilevel model Number of obs = 1523 Multivariate response model (hierarchical) Estimation algorithm: MCMC Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 2.81 Deviance (dbar) = 24566.17 Deviance (thetabar) = 24559.20 Effective no. of pars (pd) = 6.97 Bayesian DIC = 24573.14 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- written | cons_1 | 48.90423 .5350366 4612 0.000 47.86925 49.95226 female_1 | -3.336839 .691562 5237 0.000 -4.668145 -2.014274 -------------+---------------------------------------------------------------- csework | cons_2 | 69.75212 .6527885 5152 0.000 68.47237 71.03908 female_2 | 6.2297 .8492208 4961 0.000 4.594423 7.863866 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 1: student | var(cons_1) | 179.6761 6.472374 4930 167.5706 193.0152 cov(cons_1,cons_2) | 110.5733 6.123115 5225 98.69037 122.7149 var(cons_2) | 261.2758 9.553627 5317 243.1315 280.6782 ------------------------------------------------------------------------------ . . . . * 18.4 A multilevel multivariate model . . . . . . . . . . . . . . . . . 271 . . quietly runmlwin /// > (written cons female, eq(1)) /// > (csework cons female, eq(2)), /// > level2(school: (cons, eq(1)) (cons, eq(2))) /// > level1(student: (cons, eq(1)) (cons, eq(2))) /// > nopause . . runmlwin /// > (written cons female, eq(1)) /// > (csework cons female, eq(2)), /// > level2(school: (cons, eq(1)) (cons, eq(2)), residuals(u)) /// > level1(student: (cons, eq(1)) (cons, eq(2))) /// > mcmc(on) initsprevious nopause MLwiN 3.05 multilevel model Number of obs = 1523 Multivariate response model (hierarchical) Estimation algorithm: MCMC ----------------------------------------------------------- | No. of Observations per Group Level Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ school | 73 1 20.9 83 ----------------------------------------------------------- Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 4.36 Deviance (dbar) = 23523.81 Deviance (thetabar) = 23397.61 Effective no. of pars (pd) = 126.20 Bayesian DIC = 23650.01 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- written | cons_1 | 49.51464 .9637742 371 0.000 47.61178 51.28234 female_1 | -2.43486 .5927701 4113 0.000 -3.596081 -1.273605 -------------+---------------------------------------------------------------- csework | cons_2 | 69.68939 1.217393 286 0.000 67.38934 72.07934 female_2 | 7.005352 .7287404 4604 0.000 5.564051 8.405844 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 2: school | var(cons_1) | 52.31284 10.73533 2624 35.00155 76.92675 cov(cons_1,cons_2) | 29.20737 10.09714 2697 12.09802 50.99231 var(cons_2) | 79.01195 16.13632 2641 52.87912 116.7153 -----------------------------+------------------------------------------------ Level 1: student | var(cons_1) | 125.3313 4.729758 4709 116.3682 135.3106 cov(cons_1,cons_2) | 74.44132 4.505518 4781 65.97779 83.7594 var(cons_2) | 184.2451 6.924186 4549 171.0183 198.1566 ------------------------------------------------------------------------------ . . egen pickone = tag(school) . . egen u0rank = rank(u0) if pickone==1 (1450 missing values generated) . . egen u1rank = rank(u1) if pickone==1 (1450 missing values generated) . . list school u0rank if inlist(u0rank,1,73) +-----------------+ | school u0rank | |-----------------| 800. | 68137 1 | 883. | 68201 73 | +-----------------+ . . list school u1rank if inlist(u1rank,1,73) +-----------------+ | school u1rank | |-----------------| 237. | 60427 73 | 1289. | 68711 1 | +-----------------+ . . serrbar u0 u0se u0rank if pickone==1, scale(1.4) yline(0) /// > addplot( /// > (scatter u0 u0rank if pickone==1 & school==68137, mcolor(lime > ) msize(3)) /// > (scatter u0 u0rank if pickone==1 & school==68201, mcolor(red) > msize(3)) /// > (scatter u0 u0rank if pickone==1 & school==68711, mcolor(pink > ) msize(3)) /// > (scatter u0 u0rank if pickone==1 & school==60427, mcolor(cyan > ) msize(3)) /// > (scatter u0 u0rank if pickone==1 & school==22710, mcolor(yell > ow) msize(3)) /// > (scatter u0 u0rank if pickone==1 & school==67105, mcolor(gray > ) msize(3)) /// > ) legend(off) . . serrbar u1 u1se u1rank if pickone==1, scale(1.4) yline(0) /// > addplot( /// > (scatter u1 u1rank if pickone==1 & school==68137, mcolor(lime > ) msize(3)) /// > (scatter u1 u1rank if pickone==1 & school==68201, mcolor(red) > msize(3)) /// > (scatter u1 u1rank if pickone==1 & school==68711, mcolor(pink > ) msize(3)) /// > (scatter u1 u1rank if pickone==1 & school==60427, mcolor(cyan > ) msize(3)) /// > (scatter u0 u0rank if pickone==1 & school==22710, mcolor(yell > ow) msize(3)) /// > (scatter u0 u0rank if pickone==1 & school==67105, mcolor(gray > ) msize(3)) /// > ) legend(off) . . twoway /// > (scatter u1 u0 if pickone==1) /// > (scatter u1 u0 if pickone==1 & school==68137, mcolor(lime) msize(3)) > /// > (scatter u1 u0 if pickone==1 & school==68201, mcolor(red) msize(3)) / > // > (scatter u1 u0 if pickone==1 & school==68711, mcolor(pink) msize(3)) > /// > (scatter u1 u0 if pickone==1 & school==60427, mcolor(cyan) msize(3)) > /// > (scatter u1 u0 if pickone==1 & school==22710, mcolor(yellow) msize(3) > ) /// > (scatter u1 u0 if pickone==1 & school==67105, mcolor(gray) msize(3)), > /// > yline(0) xline(0) aspectratio(1) legend(off) . . . * 18.5 GCSE science data with missing records . . . . . . . . . . . . . .275 . . use "http://www.bristol.ac.uk/cmm/media/runmlwin/gcsemv1.dta", clear . . describe Contains data from http://www.bristol.ac.uk/cmm/media/runmlwin/gcsemv1.dta obs: 1,905 vars: 7 21 Oct 2011 12:19 ------------------------------------------------------------------------------- storage display value variable name type format label variable label ------------------------------------------------------------------------------- school float %9.0g student int %9.0g female byte %9.0g agemths int %9.0g written float %9.0g csework float %9.0g cons byte %9.0g ------------------------------------------------------------------------------- Sorted by: . . quietly runmlwin /// > (written cons female, eq(1)) /// > (csework cons female, eq(2)), /// > level1(student: (cons, eq(1)) (cons, eq(2))) /// > nosort nopause . . runmlwin (written cons female, eq(1)) /// > (csework cons female, eq(2)), /// > level1(student: (cons, eq(1)) (cons, eq(2))) /// > mcmc(on) initsprevious nosort nopause MLwiN 3.05 multilevel model Number of obs = 1905 Multivariate response model (hierarchical) Estimation algorithm: MCMC Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 3.72 Deviance (dbar) = 30680.77 Deviance (thetabar) = 30292.09 Effective no. of pars (pd) = 388.68 Bayesian DIC = 31069.45 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- written | cons_1 | 48.7996 .4928169 4368 0.000 47.81966 49.75703 female_1 | -3.447308 .648972 4308 0.000 -4.670654 -2.184353 -------------+---------------------------------------------------------------- csework | cons_2 | 69.83335 .6079976 4167 0.000 68.66637 71.04326 female_2 | 5.893144 .7880621 4155 0.000 4.316669 7.451438 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 1: student | var(cons_1) | 176.672 6.215684 4295 165.1042 189.5041 cov(cons_1,cons_2) | 107.9351 5.904226 3815 96.75805 119.7646 var(cons_2) | 257.8317 8.782298 4164 241.1241 275.4565 ------------------------------------------------------------------------------ . . quietly runmlwin /// > (written cons female, eq(1)) /// > (csework cons female, eq(2)), /// > level2(school: (cons, eq(1)) (cons, eq(2))) /// > level1(student: (cons, eq(1)) (cons, eq(2))) /// > nopause . . runmlwin (written cons female, eq(1)) /// > (csework cons female, eq(2)), /// > level2(school: (cons, eq(1)) (cons, eq(2))) /// > level1(student: (cons, eq(1)) (cons, eq(2))) /// > mcmc(imputesummaries) initsprevious nopause MLwiN 3.05 multilevel model Number of obs = 1905 Multivariate response model (hierarchical) Estimation algorithm: MCMC ----------------------------------------------------------- | No. of Observations per Group Level Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ school | 73 2 26.1 104 ----------------------------------------------------------- Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 5.14 Deviance (dbar) = 29389.27 Deviance (thetabar) = 28877.88 Effective no. of pars (pd) = 511.39 Bayesian DIC = 29900.66 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- written | cons_1 | 49.59137 .9537619 267 0.000 47.78756 51.494 female_1 | -2.503096 .5654505 3317 0.000 -3.628682 -1.416053 -------------+---------------------------------------------------------------- csework | cons_2 | 69.71878 1.259498 246 0.000 67.31286 72.1925 female_2 | 6.738743 .6649906 3758 0.000 5.447666 8.003235 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 2: school | var(cons_1) | 49.78759 10.10498 2424 33.71923 72.7825 cov(cons_1,cons_2) | 26.4472 9.620018 2746 9.51537 47.48494 var(cons_2) | 80.42719 16.0332 2591 53.991 118.3461 -----------------------------+------------------------------------------------ Level 1: student | var(cons_1) | 125.0162 4.356766 3498 116.6945 133.9453 cov(cons_1,cons_2) | 73.19025 4.102669 3570 65.35957 81.17703 var(cons_2) | 180.6 6.210958 3745 168.776 193.0203 ------------------------------------------------------------------------------ . . . . * 18.6 Imputation methods for missing data . . . . . . . . . . . . . . . 280 . . * 18.7 Hungarian science exam dataset . . . . . . . . . . . . . . . . . .281 . . use "http://www.bristol.ac.uk/cmm/media/runmlwin/hungary1.dta", clear . . describe Contains data from http://www.bristol.ac.uk/cmm/media/runmlwin/hungary1.dta obs: 2,439 vars: 10 21 Oct 2011 12:19 ------------------------------------------------------------------------------- storage display value variable name type format label variable label ------------------------------------------------------------------------------- school int %8.2g female byte %6.2g es_core float %7.2g biol_core float %9.2g biol_r3 float %7.2g biol_r4 float %7.2g phys_core float %9.2g phys_r2 float %7.2g cons byte %4.2g student int %7.2g ------------------------------------------------------------------------------- Sorted by: . . runmlwin /// > (es_core cons female, eq(1)) /// > (biol_core cons female, eq(2)) /// > (biol_r3 cons female, eq(3)) /// > (biol_r4 cons female, eq(4)) /// > (phys_core cons female, eq(5)) /// > (phys_r2 cons female, eq(6)), /// > level2(school: /// > (cons, eq(1)) /// > (cons, eq(2)) /// > (cons, eq(3)) /// > (cons, eq(4)) /// > (cons, eq(5)) /// > (cons, eq(6)) /// > ) /// > level1(student: /// > (cons, eq(1)) /// > (cons, eq(2)) /// > (cons, eq(3)) /// > (cons, eq(4)) /// > (cons, eq(5)) /// > (cons, eq(6)) /// > ) /// > nopause MLwiN 3.05 multilevel model Number of obs = 2439 Multivariate response model (hierarchical) Estimation algorithm: IGLS ----------------------------------------------------------- | No. of Observations per Group Level Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ school | 99 12 24.6 34 ----------------------------------------------------------- Run time (seconds) = 12.27 Number of iterations = 4 Log likelihood = -21685.861 Deviance = 43371.722 ------------------------------------------------------------------------------ | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- es_core | cons_1 | 8.379748 .0766756 109.29 0.000 8.229467 8.530029 female_1 | -.0298705 .0589677 -0.51 0.612 -.145445 .085704 -------------+---------------------------------------------------------------- biol_core | cons_2 | 7.106404 .099573 71.37 0.000 6.911245 7.301564 female_2 | -.1507606 .0663209 -2.27 0.023 -.2807471 -.0207741 -------------+---------------------------------------------------------------- biol_r3 | cons_3 | 6.844092 .1090931 62.74 0.000 6.630273 7.05791 female_3 | .0399244 .1253665 0.32 0.750 -.2057895 .2856383 -------------+---------------------------------------------------------------- biol_r4 | cons_4 | 5.912655 .1677103 35.26 0.000 5.583949 6.241362 female_4 | -.4919183 .1376173 -3.57 0.000 -.7616432 -.2221934 -------------+---------------------------------------------------------------- phys_core | cons_5 | 7.520447 .1150485 65.37 0.000 7.294956 7.745938 female_5 | -.6956075 .0729142 -9.54 0.000 -.8385167 -.5526982 -------------+---------------------------------------------------------------- phys_r2 | cons_6 | 6.636028 .1276125 52.00 0.000 6.385912 6.886144 female_6 | -.6960789 .1159983 -6.00 0.000 -.9234313 -.4687264 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ Level 2: school | var(cons_1) | .4056971 .0699745 .2685497 .5428446 cov(cons_1,cons_2) | .3785641 .0773242 .2270115 .5301167 var(cons_2) | .7585228 .1233774 .5167076 1.000338 cov(cons_1,cons_3) | .1967611 .0648008 .0697539 .3237684 cov(cons_2,cons_3) | .3581882 .0896678 .1824425 .5339339 var(cons_3) | .3670645 .1074562 .1564542 .5776748 cov(cons_1,cons_4) | .4045711 .1150639 .1790501 .6300922 cov(cons_2,cons_4) | .8020626 .1654536 .4777795 1.126346 cov(cons_3,cons_4) | .3739828 .1381693 .1031759 .6447897 var(cons_4) | 1.831498 .3265031 1.191564 2.471433 cov(cons_1,cons_5) | .3739562 .0864085 .2045987 .5433137 cov(cons_2,cons_5) | .796177 .1324452 .5365891 1.055765 cov(cons_3,cons_5) | .4674373 .1063054 .2590826 .675792 cov(cons_4,cons_5) | .8716772 .1891704 .5009101 1.242444 var(cons_5) | 1.040688 .1667709 .7138236 1.367553 cov(cons_1,cons_6) | .3437017 .0879562 .1713106 .5160927 cov(cons_2,cons_6) | .6588101 .1274299 .4090521 .908568 cov(cons_3,cons_6) | .3352234 .1047791 .1298602 .5405867 cov(cons_4,cons_6) | .8566746 .1953133 .4738676 1.239482 cov(cons_5,cons_6) | .776851 .1492816 .4842645 1.069437 var(cons_6) | .9450897 .1813081 .5897324 1.300447 -----------------------------+------------------------------------------------ Level 1: student | var(cons_1) | 2.058092 .0601656 1.94017 2.176014 cov(cons_1,cons_2) | .6347088 .0496315 .5374329 .7319847 var(cons_2) | 2.605231 .0761604 2.455959 2.754503 cov(cons_1,cons_3) | .3865331 .0916077 .2069852 .5660809 cov(cons_2,cons_3) | .4732168 .1031395 .2710671 .6753664 var(cons_3) | 4.782955 .2013422 4.388332 5.177579 cov(cons_1,cons_4) | .4715083 .1001078 .2753006 .6677159 cov(cons_2,cons_4) | 1.037474 .1141255 .8137921 1.261156 cov(cons_3,cons_4) | 1.042309 .2589172 .5348401 1.549777 var(cons_4) | 5.846511 .2466515 5.363083 6.329939 cov(cons_1,cons_5) | .6593347 .0543136 .552882 .7657874 cov(cons_2,cons_5) | 1.195499 .0641079 1.069849 1.321148 cov(cons_3,cons_5) | .4142656 .1131029 .1925879 .6359433 cov(cons_4,cons_5) | 1.162002 .1254465 .9161318 1.407873 var(cons_5) | 3.143119 .0918861 2.963026 3.323213 cov(cons_1,cons_6) | .6615305 .085161 .494618 .828443 cov(cons_2,cons_6) | 1.143536 .0974787 .9524815 1.334591 cov(cons_3,cons_6) | .6609193 .2162781 .237022 1.084817 cov(cons_4,cons_6) | 1.911501 .2290709 1.46253 2.360472 cov(cons_5,cons_6) | 1.547181 .108689 1.334155 1.760208 var(cons_6) | 4.488158 .1855335 4.124519 4.851797 ------------------------------------------------------------------------------ . . . runmlwin /// > (es_core cons female, eq(1)) /// > (biol_core cons female, eq(2)) /// > (biol_r3 cons female, eq(3)) /// > (biol_r4 cons female, eq(4)) /// > (phys_core cons female, eq(5)) /// > (phys_r2 cons female, eq(6)), /// > level2(school: /// > (cons, eq(1)) /// > (cons, eq(2)) /// > (cons, eq(3)) /// > (cons, eq(4)) /// > (cons, eq(5)) /// > (cons, eq(6)) /// > ) /// > level1(student: /// > (cons, eq(1)) /// > (cons, eq(2)) /// > (cons, eq(3)) /// > (cons, eq(4)) /// > (cons, eq(5)) /// > (cons, eq(6)) /// > ) /// > mcmc(imputeiterations(1000 2000 3000 4000 5000)) initsprevious nopaus > e MLwiN 3.05 multilevel model Number of obs = 2439 Multivariate response model (hierarchical) Estimation algorithm: MCMC ----------------------------------------------------------- | No. of Observations per Group Level Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ school | 99 12 24.6 34 ----------------------------------------------------------- Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 35.8 Deviance (dbar) = 58379.58 Deviance (thetabar) = 54347.01 Effective no. of pars (pd) = 4032.56 Bayesian DIC = 62412.14 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- es_core | cons_1 | 8.373653 .078145 547 0.000 8.222918 8.52523 female_1 | -.0299748 .0587992 4278 0.311 -.1462959 .0820448 -------------+---------------------------------------------------------------- biol_core | cons_2 | 7.091446 .1011052 281 0.000 6.898474 7.291428 female_2 | -.1513095 .0660965 4605 0.011 -.2780582 -.021592 -------------+---------------------------------------------------------------- biol_r3 | cons_3 | 6.831479 .1102422 893 0.000 6.607399 7.036054 female_3 | .0396822 .1264305 1641 0.377 -.2096095 .2915479 -------------+---------------------------------------------------------------- biol_r4 | cons_4 | 5.894037 .1807789 249 0.000 5.559918 6.260724 female_4 | -.4917055 .1373037 1575 0.000 -.7617534 -.2254238 -------------+---------------------------------------------------------------- phys_core | cons_5 | 7.49942 .1184693 268 0.000 7.276283 7.738097 female_5 | -.6958573 .0733129 4914 0.000 -.8399794 -.5571068 -------------+---------------------------------------------------------------- phys_r2 | cons_6 | 6.618468 .1280102 392 0.000 6.373932 6.873991 female_6 | -.6960409 .1185781 1672 0.000 -.9257876 -.4626595 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 2: school | var(cons_1) | .4396696 .0747743 2676 .3160496 .6049985 cov(cons_1,cons_2) | .4090383 .0830458 2980 .2667516 .5945816 var(cons_2) | .8163258 .1329957 2971 .5965448 1.123243 cov(cons_1,cons_3) | .2124392 .0671171 1048 .0941218 .3576118 cov(cons_2,cons_3) | .3825983 .0913616 1364 .2251859 .5786706 var(cons_3) | .3912677 .0966055 742 .2314377 .6091011 cov(cons_1,cons_4) | .4387758 .1243466 2391 .2178891 .7095388 cov(cons_2,cons_4) | .8677011 .1797345 2623 .5584838 1.26647 cov(cons_3,cons_4) | .4027507 .1377099 1076 .1534272 .6999133 var(cons_4) | 1.987626 .346998 2062 1.410309 2.766856 cov(cons_1,cons_5) | .4044405 .0916354 2968 .2442537 .5990666 cov(cons_2,cons_5) | .8578185 .1436889 3420 .6227015 1.180747 cov(cons_3,cons_5) | .4994063 .1096055 1539 .3074629 .7406752 cov(cons_4,cons_5) | .9375403 .2053424 2641 .5941169 1.379514 var(cons_5) | 1.121037 .1803135 3320 .8283094 1.518166 cov(cons_1,cons_6) | .3714285 .0918143 2010 .2101679 .5706401 cov(cons_2,cons_6) | .7086826 .1367385 2313 .4766403 1.01959 cov(cons_3,cons_6) | .3588667 .1057088 1049 .1650566 .5845365 cov(cons_4,cons_6) | .9277141 .2090769 2114 .5652315 1.39397 cov(cons_5,cons_6) | .8373669 .1601053 2436 .5691828 1.190207 var(cons_6) | 1.01697 .1850485 1769 .7003726 1.434798 -----------------------------+------------------------------------------------ Level 1: student | var(cons_1) | 2.065442 .0599395 4332 1.949378 2.182654 cov(cons_1,cons_2) | .6359793 .0494846 4845 .5438896 .7339767 var(cons_2) | 2.614615 .0760383 5147 2.465361 2.765478 cov(cons_1,cons_3) | .3847475 .0909221 1673 .2078417 .5628489 cov(cons_2,cons_3) | .4707815 .1029321 1657 .2741294 .6757897 var(cons_3) | 4.83688 .202982 1489 4.455706 5.244219 cov(cons_1,cons_4) | .4694843 .0998274 1487 .2740979 .6658026 cov(cons_2,cons_4) | 1.038829 .1205089 1383 .7997015 1.279959 cov(cons_3,cons_4) | 1.047889 .2679618 445 .5007663 1.568026 var(cons_4) | 5.893867 .2519012 1413 5.422122 6.406719 cov(cons_1,cons_5) | .6615125 .054405 4436 .5570675 .7696842 cov(cons_2,cons_5) | 1.198071 .0646361 4572 1.075581 1.328069 cov(cons_3,cons_5) | .4130882 .1158185 1619 .1809198 .6405624 cov(cons_4,cons_5) | 1.161997 .1268955 1504 .9139303 1.409765 var(cons_5) | 3.155362 .0929017 4670 2.97697 3.347795 cov(cons_1,cons_6) | .6606839 .0830989 1928 .4947396 .8219641 cov(cons_2,cons_6) | 1.141782 .0981779 1631 .9516136 1.333116 cov(cons_3,cons_6) | .6438664 .2208366 426 .2168724 1.074993 cov(cons_4,cons_6) | 1.914256 .2271693 593 1.464809 2.361632 cov(cons_5,cons_6) | 1.551402 .1095536 1779 1.345739 1.771337 var(cons_6) | 4.523362 .1815701 1551 4.181568 4.89982 ------------------------------------------------------------------------------ . . format %4.3f es_core biol_core biol_r3 biol_r4 phys_core phys_r2 . . bysort _mi_m (_mi_id): list es_core biol_core biol_r3 biol_r4 phys_core phys_ > r2 if _n<=3 ------------------------------------------------------------------------------- -> _mi_m = 0 +-------------------------------------------------------------+ | es_core biol_c~e biol_r3 biol_r4 phys_c~e phys_r2 | |-------------------------------------------------------------| 1. | 10.000 7.000 10.000 . 6.000 4.286 | 2. | 6.667 6.000 . 7.500 7.000 10.000 | 3. | 8.333 8.000 10.000 7.500 5.000 . | +-------------------------------------------------------------+ ------------------------------------------------------------------------------- -> _mi_m = 1 +-------------------------------------------------------------+ | es_core biol_c~e biol_r3 biol_r4 phys_c~e phys_r2 | |-------------------------------------------------------------| 1. | 10.000 7.000 10.000 4.461 6.000 4.286 | 2. | 6.667 6.000 5.503 7.500 7.000 10.000 | 3. | 8.333 8.000 10.000 7.500 5.000 6.057 | +-------------------------------------------------------------+ ------------------------------------------------------------------------------- -> _mi_m = 2 +-------------------------------------------------------------+ | es_core biol_c~e biol_r3 biol_r4 phys_c~e phys_r2 | |-------------------------------------------------------------| 1. | 10.000 7.000 10.000 5.208 6.000 4.286 | 2. | 6.667 6.000 4.282 7.500 7.000 10.000 | 3. | 8.333 8.000 10.000 7.500 5.000 2.574 | +-------------------------------------------------------------+ ------------------------------------------------------------------------------- -> _mi_m = 3 +-------------------------------------------------------------+ | es_core biol_c~e biol_r3 biol_r4 phys_c~e phys_r2 | |-------------------------------------------------------------| 1. | 10.000 7.000 10.000 6.024 6.000 4.286 | 2. | 6.667 6.000 9.119 7.500 7.000 10.000 | 3. | 8.333 8.000 10.000 7.500 5.000 7.572 | +-------------------------------------------------------------+ ------------------------------------------------------------------------------- -> _mi_m = 4 +-------------------------------------------------------------+ | es_core biol_c~e biol_r3 biol_r4 phys_c~e phys_r2 | |-------------------------------------------------------------| 1. | 10.000 7.000 10.000 8.040 6.000 4.286 | 2. | 6.667 6.000 8.627 7.500 7.000 10.000 | 3. | 8.333 8.000 10.000 7.500 5.000 5.682 | +-------------------------------------------------------------+ ------------------------------------------------------------------------------- -> _mi_m = 5 +-------------------------------------------------------------+ | es_core biol_c~e biol_r3 biol_r4 phys_c~e phys_r2 | |-------------------------------------------------------------| 1. | 10.000 7.000 10.000 6.325 6.000 4.286 | 2. | 6.667 6.000 1.165 7.500 7.000 10.000 | 3. | 8.333 8.000 10.000 7.500 5.000 5.931 | +-------------------------------------------------------------+ . . . . * Chapter learning outcomes . . . . . . . . . . . . . . . . . . . . . . .286 . . . . . . **************************************************************************** . exit end of do-file