------------------------------------------------------------------------------- name: log: Q:\C-modelling\runmlwin\website\logfiles\2020-03-27\16\6_Random_Sl > opes_Regression_Models.smcl log type: smcl opened on: 27 Mar 2020, 17:46:09 . **************************************************************************** . * MLwiN MCMC Manual . * . * 6 Random Slopes Regression Models . . . . . . . . . . . . . . . . . . 71 . * . * 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/ . **************************************************************************** . . use "http://www.bristol.ac.uk/cmm/media/runmlwin/tutorial.dta", clear . . tab school, gen(s) School ID | Freq. Percent Cum. ------------+----------------------------------- 1 | 73 1.80 1.80 2 | 55 1.36 3.15 3 | 52 1.28 4.43 4 | 79 1.95 6.38 5 | 35 0.86 7.24 6 | 80 1.97 9.21 7 | 88 2.17 11.38 8 | 102 2.51 13.90 9 | 34 0.84 14.73 10 | 50 1.23 15.96 11 | 62 1.53 17.49 12 | 47 1.16 18.65 13 | 64 1.58 20.23 14 | 198 4.88 25.10 15 | 91 2.24 27.35 16 | 88 2.17 29.51 17 | 126 3.10 32.62 18 | 120 2.96 35.58 19 | 55 1.36 36.93 20 | 39 0.96 37.89 21 | 73 1.80 39.69 22 | 90 2.22 41.91 23 | 28 0.69 42.60 24 | 37 0.91 43.51 25 | 73 1.80 45.31 26 | 75 1.85 47.15 27 | 39 0.96 48.12 28 | 57 1.40 49.52 29 | 79 1.95 51.47 30 | 42 1.03 52.50 31 | 49 1.21 53.71 32 | 42 1.03 54.74 33 | 77 1.90 56.64 34 | 26 0.64 57.28 35 | 38 0.94 58.22 36 | 70 1.72 59.94 37 | 22 0.54 60.48 38 | 54 1.33 61.81 39 | 48 1.18 63.00 40 | 71 1.75 64.75 41 | 60 1.48 66.22 42 | 58 1.43 67.65 43 | 61 1.50 69.15 44 | 29 0.71 69.87 45 | 53 1.31 71.18 46 | 83 2.04 73.22 47 | 82 2.02 75.24 48 | 2 0.05 75.29 49 | 113 2.78 78.07 50 | 73 1.80 79.87 51 | 58 1.43 81.30 52 | 61 1.50 82.80 53 | 70 1.72 84.53 54 | 8 0.20 84.73 55 | 51 1.26 85.98 56 | 38 0.94 86.92 57 | 63 1.55 88.47 58 | 37 0.91 89.38 59 | 47 1.16 90.54 60 | 80 1.97 92.51 61 | 64 1.58 94.09 62 | 71 1.75 95.84 63 | 30 0.74 96.58 64 | 59 1.45 98.03 65 | 80 1.97 100.00 ------------+----------------------------------- Total | 4,059 100.00 . . forvalues s = 1/65 { 2. . gen s`s'Xstandlrt = s`s'*standlrt 3. . } . . quietly runmlwin normexam cons standlrt s2-s65 s1Xstandlrt-s64Xstandlrt, /// > level1(student: cons) /// > nopause . . runmlwin normexam cons standlrt s2-s65 s1Xstandlrt-s64Xstandlrt, /// > level1(student: cons) mcmc(on) initsprevious nopause MLwiN 3.05 multilevel model Number of obs = 4059 Normal response model (hierarchical) Estimation algorithm: MCMC Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 41.2 Deviance (dbar) = 9117.71 Deviance (thetabar) = 8986.95 Effective no. of pars (pd) = 130.75 Bayesian DIC = 9248.46 ------------------------------------------------------------------------------ normexam | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- cons | .3828987 .0882699 5029 0.000 .2099129 .5540771 standlrt | .5680068 .081467 4906 0.000 .4112998 .7280049 s2 | .1001283 .138565 5139 0.232 -.1677259 .3742883 s3 | .1734195 .1488519 4910 0.123 -.1140699 .4651927 s4 | -.3797563 .1202757 4980 0.001 -.6163522 -.1407874 s5 | -.1216984 .1598767 5177 0.225 -.4390333 .1825442 s6 | .2186199 .137841 5310 0.055 -.0527771 .4930045 s7 | .0162874 .1187383 5005 0.446 -.2209371 .2460281 s8 | -.4072319 .1146143 5414 0.000 -.6333568 -.1850982 s9 | -.619483 .1626492 4942 0.000 -.9461018 -.3107927 s10 | -.7088634 .1381565 4405 0.000 -.9760298 -.4404503 s11 | -.1171199 .1424076 5309 0.204 -.3971475 .1606219 s12 | -.4547454 .1416022 4933 0.001 -.7302664 -.1737505 s13 | -.5338492 .126949 4855 0.000 -.7812388 -.2861922 s14 | -.5661299 .1050151 5078 0.000 -.76868 -.3561202 s15 | -.6221604 .1223598 5182 0.000 -.8635873 -.3806321 s16 | -.7692691 .1217075 4922 0.000 -1.010915 -.5285556 s17 | -.5706483 .1101897 4878 0.000 -.7873279 -.3586423 s18 | -.4419191 .1108068 5136 0.000 -.6553649 -.2254598 s19 | -.4808624 .1456481 5131 0.000 -.7721594 -.2004344 s20 | -.1125242 .1558612 4538 0.231 -.4128327 .1987937 s21 | -.1111229 .123975 4801 0.186 -.350997 .132518 s22 | -.8481477 .1171971 4969 0.000 -1.080528 -.6233695 s23 | -1.020755 .1689576 5028 0.000 -1.351787 -.691091 s24 | -.2044244 .1597402 5413 0.100 -.518286 .1031031 s25 | -.6486448 .1341165 4970 0.000 -.9061812 -.3879683 s26 | -.4200795 .1369023 4670 0.001 -.6904736 -.1521473 s27 | -.3458386 .1693115 4812 0.020 -.6857094 -.0211585 s28 | -1.156209 .1350091 5082 0.000 -1.415563 -.8938155 s29 | -.178154 .1270655 4771 0.079 -.4315093 .0726712 s30 | -.2633438 .1496261 4654 0.040 -.5610572 .026263 s31 | -.4222206 .1589408 4950 0.005 -.7480852 -.1137427 s32 | -.3206235 .1590277 5088 0.020 -.630472 -.01274 s33 | -.3431516 .1227143 5392 0.002 -.5818378 -.1034424 s34 | -.4900194 .1747814 4617 0.002 -.8412694 -.1514666 s35 | -.2496976 .1521458 5104 0.050 -.5530355 .0496476 s36 | -.5895606 .1249446 4761 0.000 -.8333155 -.3478732 s37 | -.8675189 .216598 5075 0.000 -1.286472 -.4422586 s38 | -.5389407 .134436 4730 0.000 -.7978567 -.2753556 s39 | -.2547073 .1392976 5138 0.032 -.5242554 .0124357 s40 | -.633587 .1239587 4841 0.000 -.876862 -.393086 s41 | -.1688937 .1343084 4902 0.107 -.4326383 .0881365 s42 | -.29824 .1333986 5041 0.014 -.5588632 -.0323267 s43 | -.5533348 .143605 4661 0.000 -.8367566 -.2737694 s44 | -.7300203 .1649077 5142 0.000 -1.056661 -.4074293 s45 | -.5047594 .1380316 4521 0.000 -.7754875 -.2311891 s46 | -.7738562 .1209479 4749 0.000 -1.004949 -.5370229 s47 | -.411769 .1212977 4846 0.000 -.6501902 -.1765885 s48 | -3.633738 5.323622 4982 0.244 -13.96691 6.934314 s49 | -.3330488 .112115 5155 0.001 -.5523662 -.1140235 s50 | -.7086306 .1253908 5726 0.000 -.9536544 -.4620985 s51 | -.5256231 .1345381 5067 0.000 -.7889831 -.2624268 s52 | .0076331 .1333352 5292 0.478 -.2494282 .2708692 s53 | .2103453 .1315311 4938 0.056 -.0509882 .4656654 s54 | -1.038561 .3878313 5739 0.004 -1.803321 -.273955 s55 | .1676516 .139169 5077 0.109 -.1092858 .4421896 s56 | -.3418338 .1481946 5051 0.011 -.6268197 -.0512699 s57 | -.3409764 .1275039 5042 0.004 -.5870409 -.0869096 s58 | -.1752845 .1559271 5561 0.130 -.4810661 .1220919 s59 | -1.235157 .1527219 4951 0.000 -1.528634 -.9387791 s60 | -.130769 .1216738 5006 0.143 -.3726535 .1017515 s61 | -.4204922 .1288258 4561 0.000 -.6740722 -.1730072 s62 | -.4381192 .1269583 4962 0.000 -.6881457 -.190374 s63 | .3010416 .1635065 5373 0.034 -.0226858 .6180786 s64 | -.3475514 .1408469 5389 0.006 -.6244013 -.0643206 s65 | -.557875 .1215359 4829 0.000 -.7974251 -.3226535 s1Xstandlrt | .1398511 .1158584 4442 0.113 -.0854545 .365138 s2Xstandlrt | .1928056 .1197126 4705 0.054 -.0408015 .4235091 s3Xstandlrt | .0116518 .1426982 4638 0.468 -.2705435 .2907643 s4Xstandlrt | .1946414 .1163662 5418 0.048 -.0340259 .4169483 s5Xstandlrt | .115835 .1953294 5156 0.278 -.2633358 .4935174 s6Xstandlrt | -.0315715 .1270774 5250 0.399 -.2874011 .2145703 s7Xstandlrt | -.3243473 .1213597 5010 0.003 -.5689812 -.0904213 s8Xstandlrt | -.001073 .1064296 4970 0.497 -.2103568 .2101197 s9Xstandlrt | -.1699552 .139166 5108 0.107 -.4405415 .0994135 s10Xstandlrt | -.271206 .163033 4557 0.049 -.5911345 .0475899 s11Xstandlrt | -.1085077 .1260762 5152 0.189 -.352398 .1412848 s12Xstandlrt | -.0894932 .1507942 5353 0.281 -.3800423 .204474 s13Xstandlrt | .0582598 .1205407 5436 0.314 -.1804047 .2888144 s14Xstandlrt | .0390844 .0986844 4817 0.346 -.1527584 .2311304 s15Xstandlrt | .1670316 .1278864 4674 0.096 -.0858997 .4142483 s16Xstandlrt | -.1608265 .1247431 6062 0.093 -.4055517 .0824508 s17Xstandlrt | -.0697023 .1014513 4849 0.244 -.2684763 .1318032 s18Xstandlrt | -.2067605 .1329829 4885 0.059 -.4653965 .0578059 s19Xstandlrt | .2284109 .1751168 5359 0.097 -.1218605 .5690634 s20Xstandlrt | -.0522555 .1449193 4736 0.358 -.3403771 .2298898 s21Xstandlrt | -.0153269 .1261158 5022 0.459 -.2596149 .2334021 s22Xstandlrt | -.0423489 .1108826 4839 0.350 -.2625082 .1775364 s23Xstandlrt | -.1746485 .1591219 5223 0.143 -.4771583 .1394551 s24Xstandlrt | -.1682774 .1548852 5195 0.141 -.4690679 .1380709 s25Xstandlrt | -.034443 .1167871 4956 0.386 -.2651278 .1945765 s26Xstandlrt | -.0244853 .1233938 4847 0.418 -.2647182 .2136041 s27Xstandlrt | .0071154 .1471073 4718 0.483 -.2825571 .2962275 s28Xstandlrt | -.2864861 .1377901 4909 0.017 -.5579131 -.0171367 s29Xstandlrt | -.1678391 .1249593 5416 0.090 -.4083623 .0815071 s30Xstandlrt | .2370846 .1294213 5086 0.033 -.0145805 .4887541 s31Xstandlrt | -.1633642 .1757519 5295 0.173 -.5109793 .1741467 s32Xstandlrt | .0964239 .1324536 4216 0.239 -.164018 .3511853 s33Xstandlrt | -.0601228 .1328794 5360 0.328 -.3202357 .1953464 s34Xstandlrt | .161348 .1375983 4770 0.115 -.1038038 .4270499 s35Xstandlrt | -.1671994 .1775077 4706 0.172 -.5100777 .18247 s36Xstandlrt | -.1283489 .1114188 4553 0.121 -.3511182 .0881 s37Xstandlrt | -.327189 .1667229 5234 0.024 -.6483497 -.0028818 s38Xstandlrt | .0538285 .1256465 4938 0.328 -.2007914 .2959894 s39Xstandlrt | -.1176243 .1253727 5217 0.176 -.366055 .1261652 s40Xstandlrt | .1594256 .1169824 4990 0.090 -.0696637 .385431 s41Xstandlrt | -.0861532 .1320192 4626 0.252 -.347767 .1700156 s42Xstandlrt | -.1510401 .1443776 5043 0.149 -.4383329 .1354585 s43Xstandlrt | .1633043 .1473483 5297 0.132 -.1291765 .449477 s44Xstandlrt | -.1983181 .1547447 5329 0.100 -.4981424 .1032241 s45Xstandlrt | -.0024178 .1353289 5088 0.494 -.2721189 .2632308 s46Xstandlrt | -.1039234 .1212726 5003 0.195 -.3457965 .1323145 s47Xstandlrt | .0959345 .1279094 4675 0.219 -.1590374 .3428527 s48Xstandlrt | -7.424105 12.76807 4958 0.271 -32.15664 18.17549 s49Xstandlrt | -.0837829 .1137018 5141 0.229 -.3117429 .1382738 s50Xstandlrt | .1102691 .1196755 5006 0.171 -.1235557 .346255 s51Xstandlrt | -.2284794 .119663 5270 0.029 -.4624638 .0079064 s52Xstandlrt | .1702481 .1227044 5065 0.082 -.079735 .4053911 s53Xstandlrt | .5111609 .1257292 4436 0.000 .2687461 .7625904 s54Xstandlrt | -.5253156 .4664243 4859 0.132 -1.421994 .3717138 s55Xstandlrt | .0576532 .1329145 4839 0.331 -.2043597 .3202004 s56Xstandlrt | .3066609 .1607843 5139 0.033 -.0148911 .6184865 s57Xstandlrt | .0452798 .1290077 5348 0.362 -.2077755 .297232 s58Xstandlrt | -.2114991 .1655886 5279 0.098 -.5372512 .1141645 s59Xstandlrt | -.2063223 .1422214 4780 0.074 -.4893017 .0721473 s60Xstandlrt | .0679565 .1231534 5250 0.288 -.1746778 .3110718 s61Xstandlrt | .0678787 .1264575 4528 0.294 -.1815355 .3154905 s62Xstandlrt | -.0209289 .1405565 4620 0.449 -.2959211 .2562065 s63Xstandlrt | -.2344835 .1989328 4702 0.119 -.6267697 .1453066 s64Xstandlrt | .138404 .1308696 4665 0.144 -.1204678 .3953403 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 1: student | var(cons) | .5533478 .0125902 4390 .5293191 .5783081 ------------------------------------------------------------------------------ . . quietly runmlwin normexam cons standlrt, /// > level2(school: cons standlrt) /// > level1(student: cons) /// > nopause . . runmlwin normexam cons standlrt, /// > level2(school: cons standlrt) /// > 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) = 3.18 Deviance (dbar) = 9122.67 Deviance (thetabar) = 9031.18 Effective no. of pars (pd) = 91.50 Bayesian DIC = 9214.17 ------------------------------------------------------------------------------ normexam | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- cons | -.0132462 .0398381 243 0.358 -.0890089 .0733577 standlrt | .5568666 .020332 769 0.000 .515988 .5963049 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 2: school | var(cons) | .0970636 .0200401 2964 .06544 .1425988 cov(cons,standlrt) | .0195519 .0073726 1709 .0064736 .0359522 var(standlrt) | .0154917 .0048418 1029 .0080367 .0268087 -----------------------------+------------------------------------------------ Level 1: student | var(cons) | .5543189 .0124713 4659 .5302743 .5795808 ------------------------------------------------------------------------------ . // Note: If you look at the MLwiN equations window, you will see that that . // the inverse wishart priors matrix S_u appears to be a zero matrix. This . // is a display problem in MLwiN. The values of S_u are, as they should be, . // the same as the initial values for the level 2 variance co-variance . // matrix. This display problem applies to all MCMC models set up by . // runmlwin which have two or more sets of random effects at a given level. . . . . * 6.1 Prediction intervals for a random slopes regression model . . . . . 75 . . quietly runmlwin normexam cons standlrt, /// > level2(school: cons standlrt) /// > level1(student: cons) /// > nopause . . runmlwin normexam cons standlrt, /// > level2(school: cons standlrt, residuals(u, savechains("u.dta", replac > e))) /// > level1(student: cons) /// > mcmc(chain(5001)) /// > 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 = 5001 Thinning = 1 Run time (seconds) = 19.1 Deviance (dbar) = 9122.67 Deviance (thetabar) = 9031.17 Effective no. of pars (pd) = 91.49 Bayesian DIC = 9214.16 ------------------------------------------------------------------------------ normexam | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- cons | -.0132441 .0398344 243 0.358 -.0890082 .073356 standlrt | .5568645 .0203305 769 0.000 .5159882 .5963015 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 2: school | var(cons) | .0970614 .0200387 2966 .06544 .1425927 cov(cons,standlrt) | .0195508 .0073722 1710 .0064737 .035952 var(standlrt) | .0154919 .0048413 1029 .0080371 .0268084 -----------------------------+------------------------------------------------ Level 1: student | var(cons) | .5543174 .0124705 4658 .5302745 .5795785 ------------------------------------------------------------------------------ . . putmata X=(cons standlrt) (1 matrix posted) . putmata school_x=school (1 vector posted) . preserve . . mcmcsum, getchains . putmata beta=(FP1_cons FP1_standlrt) (1 matrix posted) . . use "u.dta", clear . drop idnum . rename value u . reshape wide u, i(iteration school) j(residual) (note: j = 0 1) Data long -> wide ----------------------------------------------------------------------------- Number of obs. 650130 -> 325065 Number of variables 4 -> 4 j variable (2 values) residual -> (dropped) xij variables: u -> u0 u1 ----------------------------------------------------------------------------- . . sort school iteration . . putmata residuals=(u0 u1) (1 matrix posted) . putmata school_u=school (1 vector posted) . restore . . ssc install moremata checking moremata consistency and verifying not already installed... all files already exist and are up to date. . . mata ------------------------------------------------- mata (type end to exit) ----- : xb = X*beta' : grpnos = uniqrows(school_x); : for (i = 1; i < rows(grpnos); i++) { > xind = selectindex(school_x :== i); > uind = selectindex(school_u :== i); > xgrp = X[xind, .]; > ugrp = residuals[uind, .]; > xu = xgrp*ugrp'; > xb[xind, .] = xb[xind, .] + xu; > } : quants = mm_quantile(xb', 1, (0.025 \ 0.5 \ 0.975))' : : end ------------------------------------------------------------------------------- . . getmata (predlo predmd predhi)=quants . . mata: mata drop X beta residuals school_x school_u grpnos xind uind xgrp ugrp > xb xu i quants . . sort school standlrt . . twoway (line predmd standlrt, connect(a)) /// > (line predlo standlrt, lcolor(maroon) lpattern(dot) connect(a)) /// > (line predhi standlrt, lcolor(maroon) lpattern(dot) connect(a)), lege > nd(off) . . twoway (line predmd standlrt if school==30, lcolor(blue) connect(a)) /// > (line predlo standlrt if school==30, lcolor(blue) lpattern(dot) conne > ct(a)) /// > (line predhi standlrt if school==30, lcolor(blue) lpattern(dot) conne > ct(a)) /// > (line predmd standlrt if school==44, lcolor(green) connect(a)) /// > (line predlo standlrt if school==44, lcolor(green) lpattern(dot) conn > ect(a)) /// > (line predhi standlrt if school==44, lcolor(green) lpattern(dot) conn > ect(a)) /// > (line predmd standlrt if school==53, lcolor(ebblue) connect(a)) /// > (line predlo standlrt if school==53, lcolor(ebblue) lpattern(dot) con > nect(a)) /// > (line predhi standlrt if school==53, lcolor(ebblue) lpattern(dot) con > nect(a)) /// > (line predmd standlrt if school==59, lcolor(maroon) connect(a)) /// > (line predlo standlrt if school==59, lcolor(maroon) lpattern(dot) con > nect(a)) /// > (line predhi standlrt if school==59, lcolor(maroon) lpattern(dot) con > nect(a)) /// > , ytitle("Predicted age 16 exam score (normalised)") legend(order(1 " > school_30" 4 "school_44" 7 "school_53" 10 "school_59")) . . . * 6.2 Alternative priors for variance matrices . . . . . . . . . . . . . .78 . . * 6.3 WinBUGS priors (Prior 2) . . . . . . . . . . . . . . . . . . . . . .78 . . use "http://www.bristol.ac.uk/cmm/media/runmlwin/tutorial.dta", clear . . quietly runmlwin normexam cons standlrt, /// > level2(school: cons standlrt) /// > level1(student: cons) /// > nopause . . estimates store IGLS . . matrix b = e(b) . . matrix V = e(V) . . quietly runmlwin normexam cons standlrt, /// > level2(school: cons standlrt) /// > level1(student: cons) /// > mcmc(on) initsb(b) initsv(V) nopause . . estimates store GIBBS_default . . matrix b2 = b . . matrix list b2 b2[1,6] FP1: FP1: RP2: RP2: RP2: > RP1: cons standlrt var(cons) cov(cons\s~) var(standl~) va > r(cons) y1 -.01150513 .55673047 .09044456 .01804142 .01453612 .5 > 5365755 . . matrix b2[1,3] = .1 . . matrix b2[1,4] = 0 . . matrix b2[1,5] = .1 . . quietly runmlwin normexam cons standlrt, /// > level2(school: cons standlrt) /// > level1(student: cons) /// > mcmc(on) initsb(b2) initsv(V) nopause . . estimates store GIBBS_prior_2 . . . . * 6.4 Uniform prior . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 . . quietly runmlwin normexam cons standlrt, /// > level2(school: cons standlrt) /// > level1(student: cons) /// > mcmc(rpprior(uniform)) initsb(b) initsv(V) nopause . . estimates store GIBBS_uniform . . . . * 6.5 Informative prior . . . . . . . . . . . . . . . . . . . . . . . . . 80 . . matrix P = (.*b \ .*b) . . matrix rownames P = mean sd . . matrix list P P[2,6] FP1: FP1: RP2: RP2: RP2: > RP1: cons standlrt var(cons) cov(cons\s~) var(standl~) > var(cons) mean . . . . . > . sd . . . . . > . . . matrix P[1,3] = .09 . . matrix P[1,4] = .018 . . matrix P[1,5] = .015 . . matrix P[2,3] = 65 . . matrix P[2,4] = 65 . . matrix P[2,5] = 65 . . matrix list P P[2,6] FP1: FP1: RP2: RP2: RP2: > RP1: cons standlrt var(cons) cov(cons\s~) var(standl~) > var(cons) mean . . .09 .018 .015 > . sd . . 65 65 65 > . . . quietly runmlwin normexam cons standlrt, /// > level2(school: cons standlrt) /// > level1(student: cons) /// > mcmc(priormatrix(P)) initsb(b) initsv(V) nopause . . estimates store GIBBS_prior_4 . . . . * 6.6 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 . . estimates table IGLS /// > GIBBS_default GIBBS_prior_2 GIBBS_uniform GIBBS_prior_4, b(%4.3f) ---------------------------------------------------------------- Variable | IGLS GIBBS~t GIBBS~2 GIBBS~m GIBBS~4 -------------+-------------------------------------------------- FP1 | cons | -0.012 -0.013 -0.014 -0.016 -0.014 standlrt | 0.557 0.557 0.555 0.556 0.556 -------------+-------------------------------------------------- RP2 | var(cons) | 0.090 0.097 0.097 0.104 0.091 cov(cons\s~) | 0.018 0.020 0.018 0.020 0.018 var(standl~) | 0.015 0.015 0.023 0.018 0.015 -------------+-------------------------------------------------- RP1 | var(cons) | 0.554 0.554 0.553 0.554 0.554 ---------------------------------------------------------------- . . . * Chapter learning outcomes . . . . . . . . . . . . . . . . . . . . . . . 81 . . . . . . **************************************************************************** . exit end of do-file