------------------------------------------------------------------------------- name: log: Q:\C-modelling\runmlwin\website\logfiles\2024-10-11\18\18_Multivar > iate_Normal_Response_Models_and_Missing_Data.smcl log type: smcl opened on: 11 Oct 2024, 17:43:36 . **************************************************************************** . * 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 . * https://www.bristol.ac.uk/cmm/software/runmlwin/ . **************************************************************************** . . * 18.1 GCSE science data with complete records only . . . . . . . . . . .264 . . use "https://www.bristol.ac.uk/cmm/media/runmlwin/gcsecomp1.dta", clear . . describe Contains data from https://www.bristol.ac.uk/cmm/media/runmlwin/gcsecomp1.dta Observations: 1,523 Variables: 6 21 Oct 2011 12:19 ------------------------------------------------------------------------------- Variable Storage Display Value 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.13 multilevel model Number of obs = 1523 Multivariate response model (hierarchical) Estimation algorithm: IGLS Run time (seconds) = 2.63 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.13 multilevel model Number of obs = 1523 Multivariate response model (hierarchical) Estimation algorithm: MCMC Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 9.34 Deviance (dbar) = 24711.20 Deviance (thetabar) = 24706.25 Effective no. of pars (pd) = 4.96 Bayesian DIC = 24716.16 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- written | cons_1 | 46.92953 .3489235 4750 0.000 46.2611 47.61791 -------------+---------------------------------------------------------------- csework | cons_2 | 73.42916 .4158139 4542 0.000 72.60318 74.23375 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 1: student | var(cons_1) | 182.4452 6.58998 4979 170.133 196.041 cov(cons_1,cons_2) | 105.4737 6.264101 4944 93.45724 117.6452 var(cons_2) | 270.2142 9.658201 5333 251.4789 289.3081 ------------------------------------------------------------------------------ . . . . * 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.13 multilevel model Number of obs = 1523 Multivariate response model (hierarchical) Estimation algorithm: MCMC Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 10.2 Deviance (dbar) = 24566.15 Deviance (thetabar) = 24559.20 Effective no. of pars (pd) = 6.95 Bayesian DIC = 24573.10 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- written | cons_1 | 48.90698 .5340193 5961 0.000 47.87279 49.94862 female_1 | -3.342321 .6956102 6096 0.000 -4.705378 -1.960064 -------------+---------------------------------------------------------------- csework | cons_2 | 69.74173 .6538723 5323 0.000 68.4637 71.04955 female_2 | 6.239366 .8363045 5542 0.000 4.560027 7.862509 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 1: student | var(cons_1) | 179.6803 6.542529 4847 167.6472 193.2205 cov(cons_1,cons_2) | 110.4295 6.285007 4475 98.49 123.014 var(cons_2) | 261.1256 9.381823 4556 243.6505 280.4336 ------------------------------------------------------------------------------ . . . . * 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.13 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) = 13.6 Deviance (dbar) = 23524.55 Deviance (thetabar) = 23397.77 Effective no. of pars (pd) = 126.79 Bayesian DIC = 23651.34 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- written | cons_1 | 49.55482 .9462158 315 0.000 47.65114 51.29932 female_1 | -2.445793 .6005891 4531 0.000 -3.633558 -1.25604 -------------+---------------------------------------------------------------- csework | cons_2 | 69.73805 1.240329 301 0.000 67.25804 72.07998 female_2 | 6.990753 .7361254 4256 0.000 5.557744 8.436465 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 2: school | var(cons_1) | 52.16358 10.67094 2482 34.79824 76.22251 cov(cons_1,cons_2) | 29.44345 10.2412 2527 11.75837 52.0968 var(cons_2) | 79.62558 15.79285 2653 54.47063 115.3918 -----------------------------+------------------------------------------------ Level 1: student | var(cons_1) | 125.3032 4.650526 4339 116.2825 134.551 cov(cons_1,cons_2) | 74.28632 4.447083 4160 65.83895 83.28859 var(cons_2) | 184.0769 6.851034 4538 170.8157 198.2126 ------------------------------------------------------------------------------ . . egen pickone = tag(school) . . egen u0rank = rank(u0) if pickone==1 (1,450 missing values generated) . . egen u1rank = rank(u1) if pickone==1 (1,450 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 "https://www.bristol.ac.uk/cmm/media/runmlwin/gcsemv1.dta", clear . . describe Contains data from https://www.bristol.ac.uk/cmm/media/runmlwin/gcsemv1.dta Observations: 1,905 Variables: 7 21 Oct 2011 12:19 ------------------------------------------------------------------------------- Variable Storage Display Value 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.13 multilevel model Number of obs = 1905 Multivariate response model (hierarchical) Estimation algorithm: MCMC Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 11.7 Deviance (dbar) = 30680.90 Deviance (thetabar) = 30292.14 Effective no. of pars (pd) = 388.77 Bayesian DIC = 31069.67 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- written | cons_1 | 48.8013 .4975424 4462 0.000 47.83836 49.79139 female_1 | -3.432254 .6445828 4037 0.000 -4.704091 -2.206844 -------------+---------------------------------------------------------------- csework | cons_2 | 69.84343 .6025975 4273 0.000 68.67178 71.03507 female_2 | 5.876012 .7725646 3930 0.000 4.380694 7.353841 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 1: student | var(cons_1) | 176.6462 5.875989 4150 165.3133 188.3433 cov(cons_1,cons_2) | 108.0172 5.664145 4123 97.25599 119.3236 var(cons_2) | 258.0695 8.657141 4148 241.4796 275.2269 ------------------------------------------------------------------------------ . . 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.13 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) = 16 Deviance (dbar) = 29389.01 Deviance (thetabar) = 28878.48 Effective no. of pars (pd) = 510.53 Bayesian DIC = 29899.54 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- written | cons_1 | 49.32531 .9430359 293 0.000 47.4336 51.20851 female_1 | -2.494497 .5558111 3558 0.000 -3.552968 -1.406893 -------------+---------------------------------------------------------------- csework | cons_2 | 69.67221 1.235998 223 0.000 67.21374 71.98098 female_2 | 6.754143 .6706416 3688 0.000 5.402785 8.054021 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 2: school | var(cons_1) | 49.54078 10.16831 2521 33.04803 74.00938 cov(cons_1,cons_2) | 26.33935 9.65715 2616 9.302722 46.84858 var(cons_2) | 79.7973 15.77671 2759 53.62886 115.5522 -----------------------------+------------------------------------------------ Level 1: student | var(cons_1) | 125.0641 4.407213 3493 116.7799 134.0302 cov(cons_1,cons_2) | 73.19428 4.198675 3552 65.40832 81.85799 var(cons_2) | 180.6279 6.336076 3797 168.7305 193.4391 ------------------------------------------------------------------------------ . . . . * 18.6 Imputation methods for missing data . . . . . . . . . . . . . . . 280 . . * 18.7 Hungarian science exam dataset . . . . . . . . . . . . . . . . . .281 . . use "https://www.bristol.ac.uk/cmm/media/runmlwin/hungary1.dta", clear . . describe Contains data from https://www.bristol.ac.uk/cmm/media/runmlwin/hungary1.dta Observations: 2,439 Variables: 10 21 Oct 2011 12:19 ------------------------------------------------------------------------------- Variable Storage Display Value 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.13 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) = 30.71 Number of iterations = 4 Log likelihood = -21685.861 Deviance = 43371.721 ------------------------------------------------------------------------------ | 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.13 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) = 81.6 Deviance (dbar) = 58372.50 Deviance (thetabar) = 54340.24 Effective no. of pars (pd) = 4032.26 Bayesian DIC = 62404.76 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- es_core | cons_1 | 8.37953 .0772663 461 0.000 8.227451 8.52638 female_1 | -.0292699 .0595769 4580 0.312 -.1465809 .0899956 -------------+---------------------------------------------------------------- biol_core | cons_2 | 7.107036 .1022541 273 0.000 6.911324 7.301126 female_2 | -.1498485 .0661559 4659 0.014 -.2786982 -.0172812 -------------+---------------------------------------------------------------- biol_r3 | cons_3 | 6.846253 .1111166 641 0.000 6.63087 7.06504 female_3 | .0365528 .1257086 1617 0.386 -.2103711 .2846254 -------------+---------------------------------------------------------------- biol_r4 | cons_4 | 5.918747 .1748532 298 0.000 5.570021 6.252036 female_4 | -.4837242 .1377324 1549 0.000 -.7507768 -.2140937 -------------+---------------------------------------------------------------- phys_core | cons_5 | 7.520868 .1187328 252 0.000 7.293864 7.753351 female_5 | -.6949734 .0726202 4910 0.000 -.8376879 -.5531294 -------------+---------------------------------------------------------------- phys_r2 | cons_6 | 6.632043 .1285445 392 0.000 6.382594 6.881839 female_6 | -.6940122 .1159931 1694 0.000 -.9215575 -.4669133 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 2: school | var(cons_1) | .4375061 .0750016 2773 .3132893 .6050773 cov(cons_1,cons_2) | .410798 .0845465 2918 .2666091 .5952082 var(cons_2) | .8213227 .1359231 2813 .5934717 1.122611 cov(cons_1,cons_3) | .2134261 .066279 1287 .094084 .3562096 cov(cons_2,cons_3) | .3903145 .0938602 1390 .2257853 .5924433 var(cons_3) | .3998276 .0957203 751 .2419002 .6143878 cov(cons_1,cons_4) | .443918 .1240967 2253 .2212544 .7221499 cov(cons_2,cons_4) | .8721395 .1828569 2388 .5584837 1.276674 cov(cons_3,cons_4) | .4063042 .1404653 1244 .150701 .7018609 var(cons_4) | 1.990608 .3477106 1976 1.407996 2.748623 cov(cons_1,cons_5) | .4055615 .0938287 3012 .2464548 .6158925 cov(cons_2,cons_5) | .8656318 .1475299 3285 .6233487 1.197152 cov(cons_3,cons_5) | .5107723 .1117213 1515 .3214023 .7580279 cov(cons_4,cons_5) | .9488169 .2097334 2558 .5950646 1.402902 var(cons_5) | 1.134099 .186325 3061 .8257533 1.551593 cov(cons_1,cons_6) | .3720411 .093919 2213 .2076318 .5754008 cov(cons_2,cons_6) | .7140263 .1378662 2551 .4837524 1.020003 cov(cons_3,cons_6) | .3614402 .1059958 1034 .1723494 .587334 cov(cons_4,cons_6) | .9290927 .2116028 1995 .5750259 1.387441 cov(cons_5,cons_6) | .8430509 .1626003 2636 .5655881 1.212518 var(cons_6) | 1.019133 .1900981 1783 .6923778 1.43224 -----------------------------+------------------------------------------------ Level 1: student | var(cons_1) | 2.067311 .0607747 4870 1.954392 2.18939 cov(cons_1,cons_2) | .637256 .0501779 4074 .5399871 .7376273 var(cons_2) | 2.617655 .0761695 4204 2.473343 2.7684 cov(cons_1,cons_3) | .3885889 .0909855 1580 .2070546 .5658884 cov(cons_2,cons_3) | .4770931 .1002483 1686 .2837802 .6770493 var(cons_3) | 4.83767 .197249 1512 4.463555 5.236548 cov(cons_1,cons_4) | .4702335 .0991163 1591 .2754085 .6630238 cov(cons_2,cons_4) | 1.036856 .1221934 1367 .8014434 1.281606 cov(cons_3,cons_4) | 1.067478 .2547621 443 .5508602 1.578493 var(cons_4) | 5.894216 .253679 1400 5.40899 6.412472 cov(cons_1,cons_5) | .6621042 .0541477 4803 .557095 .7726376 cov(cons_2,cons_5) | 1.199742 .0647243 4585 1.073059 1.329579 cov(cons_3,cons_5) | .4140813 .1111573 1677 .2000607 .6374137 cov(cons_4,cons_5) | 1.162513 .1260143 1623 .9171255 1.410581 var(cons_5) | 3.155927 .0928256 4481 2.976611 3.344226 cov(cons_1,cons_6) | .6666509 .0840175 1746 .5025827 .8298049 cov(cons_2,cons_6) | 1.150024 .0970628 1738 .96694 1.344533 cov(cons_3,cons_6) | .6634248 .2143845 406 .2544339 1.090423 cov(cons_4,cons_6) | 1.923765 .2164727 603 1.498478 2.337169 cov(cons_5,cons_6) | 1.557777 .1089376 1713 1.347381 1.772818 var(cons_6) | 4.528474 .1878266 1570 4.175358 4.904919 ------------------------------------------------------------------------------ . . 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 12.072 6.000 4.286 | 2. | 6.667 6.000 7.410 7.500 7.000 10.000 | 3. | 8.333 8.000 10.000 7.500 5.000 6.235 | +-------------------------------------------------------------+ ------------------------------------------------------------------------------- -> _mi_m = 2 +-------------------------------------------------------------+ | es_core biol_c~e biol_r3 biol_r4 phys_c~e phys_r2 | |-------------------------------------------------------------| 1. | 10.000 7.000 10.000 8.439 6.000 4.286 | 2. | 6.667 6.000 7.838 7.500 7.000 10.000 | 3. | 8.333 8.000 10.000 7.500 5.000 3.376 | +-------------------------------------------------------------+ ------------------------------------------------------------------------------- -> _mi_m = 3 +-------------------------------------------------------------+ | es_core biol_c~e biol_r3 biol_r4 phys_c~e phys_r2 | |-------------------------------------------------------------| 1. | 10.000 7.000 10.000 7.057 6.000 4.286 | 2. | 6.667 6.000 9.132 7.500 7.000 10.000 | 3. | 8.333 8.000 10.000 7.500 5.000 7.091 | +-------------------------------------------------------------+ ------------------------------------------------------------------------------- -> _mi_m = 4 +-------------------------------------------------------------+ | es_core biol_c~e biol_r3 biol_r4 phys_c~e phys_r2 | |-------------------------------------------------------------| 1. | 10.000 7.000 10.000 5.219 6.000 4.286 | 2. | 6.667 6.000 6.104 7.500 7.000 10.000 | 3. | 8.333 8.000 10.000 7.500 5.000 9.169 | +-------------------------------------------------------------+ ------------------------------------------------------------------------------- -> _mi_m = 5 +-------------------------------------------------------------+ | es_core biol_c~e biol_r3 biol_r4 phys_c~e phys_r2 | |-------------------------------------------------------------| 1. | 10.000 7.000 10.000 7.192 6.000 4.286 | 2. | 6.667 6.000 4.654 7.500 7.000 10.000 | 3. | 8.333 8.000 10.000 7.500 5.000 5.702 | +-------------------------------------------------------------+ . . . . * Chapter learning outcomes . . . . . . . . . . . . . . . . . . . . . . .286 . . . . . . **************************************************************************** . exit end of do-file