------------------------------------------------------------------------------- name: log: Q:\C-modelling\runmlwin\website\logfiles\2020-03-27\16\13_Ordered_ > Categorical_Responses.smcl log type: smcl opened on: 27 Mar 2020, 17:56:19 . **************************************************************************** . * MLwiN MCMC Manual . * . * 13 Ordered Categorical Responses . . . . . . . . . . . . . . . . . . .181 . * . * 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/ . **************************************************************************** . . * 13.1 A level chemistry dataset . . . . . . . . . . . . . . . . . . . . 181 . . use "http://www.bristol.ac.uk/cmm/media/runmlwin/alevchem.dta", clear . . describe Contains data from http://www.bristol.ac.uk/cmm/media/runmlwin/alevchem.dta obs: 2,166 vars: 8 21 Oct 2011 12:19 ------------------------------------------------------------------------------- storage display value variable name type format label variable label ------------------------------------------------------------------------------- lea int %9.0g LEA ID estab int %9.0g Establishment ID pupil float %9.0g Pupil ID a_point byte %9.0g a_point A-level point score gcse_tot byte %9.0g Total GCSE point score gcse_no byte %9.0g Number of GCSEs taken cons byte %9.0g Constant gender byte %9.0g gender Gender ------------------------------------------------------------------------------- Sorted by: . . generate gcseav = gcse_tot/gcse_no . . histogram gcseav (bin=33, start=3.1428571, width=.14718615) . . replace gcseav = gcseav - 6 (2,166 real changes made) . . generate gcseav2 = gcseav^2 . . generate gcseav3 = gcseav^3 . . . . * 13.2 Normal response models . . . . . . . . . . . . . . . . . . . . . .184 . . quietly runmlwin a_point cons, /// > level1(pupil: cons) /// > nopause . . runmlwin a_point cons, /// > level1(pupil: cons) /// > mcmc(on) initsprevious nopause MLwiN 3.05 multilevel model Number of obs = 2166 Normal response model (hierarchical) Estimation algorithm: MCMC Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 1.15 Deviance (dbar) = 8589.84 Deviance (thetabar) = 8587.81 Effective no. of pars (pd) = 2.03 Bayesian DIC = 8591.86 ------------------------------------------------------------------------------ a_point | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- cons | 3.518598 .0376554 5419 0.000 3.443225 3.59127 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 1: pupil | var(cons) | 3.089023 .0954792 4888 2.911594 3.281004 ------------------------------------------------------------------------------ . . rename gender female . . runmlwin a_point cons gcseav gcseav2 gcseav3 female, /// > level1(pupil: cons) nopause MLwiN 3.05 multilevel model Number of obs = 2166 Normal response model (hierarchical) Estimation algorithm: IGLS Run time (seconds) = 0.55 Number of iterations = 2 Log likelihood = -3485.9224 Deviance = 6971.8447 ------------------------------------------------------------------------------ a_point | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- cons | 3.320883 .0406532 81.69 0.000 3.241204 3.400562 gcseav | 1.56154 .0515331 30.30 0.000 1.460537 1.662543 gcseav2 | .1931122 .026556 7.27 0.000 .1410633 .245161 gcseav3 | -.0732638 .0189904 -3.86 0.000 -.1104843 -.0360433 female | -.4823484 .0532934 -9.05 0.000 -.5868015 -.3778954 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ Level 1: pupil | var(cons) | 1.463583 .0444737 1.376417 1.55075 ------------------------------------------------------------------------------ . . runmlwin a_point cons gcseav gcseav2 gcseav3 female, /// > level1(pupil: cons) /// > mcmc(on) initsprevious nopause MLwiN 3.05 multilevel model Number of obs = 2166 Normal response model (hierarchical) Estimation algorithm: MCMC Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 1.74 Deviance (dbar) = 6977.87 Deviance (thetabar) = 6971.86 Effective no. of pars (pd) = 6.01 Bayesian DIC = 6983.89 ------------------------------------------------------------------------------ a_point | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- cons | 3.321367 .0406196 5793 0.000 3.241933 3.399016 gcseav | 1.561339 .0515352 4574 0.000 1.461521 1.660754 gcseav2 | .1922041 .0270049 5425 0.000 .1384648 .2453268 gcseav3 | -.0733662 .0190038 4400 0.000 -.111292 -.0362768 female | -.4826658 .0534952 5236 0.000 -.5858913 -.378778 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 1: pupil | var(cons) | 1.468699 .0449928 4888 1.384652 1.560749 ------------------------------------------------------------------------------ . . gen pred = [FP1]cons + [FP1]gcseav*gcseav + [FP1]gcseav2*gcseav2 /// > + [FP1]gcseav3*gcseav3 + [FP1]female*female . . twoway /// > (line pred gcseav if female==0, sort) /// > (line pred gcseav if female==1, sort) . . . . . * 13.3 Ordered multinomial modelling . . . . . . . . . . . . . . . . . . 186 . . runmlwin a_point cons, /// > level1(pupil:) /// > discrete(distribution(multinomial) link(ologit) denominator(cons) bas > ecategory(6)) nopause MLwiN 3.05 multilevel model Number of obs = 2166 Ordered multinomial logit response model (hierarchical) Estimation algorithm: IGLS, MQL1 ---------------------------------- Contrast | Log-odds -------------+-------------------- 1 | 1 vs. 2 3 4 5 6 2 | 1 2 vs. 3 4 5 6 3 | 1 2 3 vs. 4 5 6 4 | 1 2 3 4 vs. 5 6 5 | 1 2 3 4 5 vs. 6 ---------------------------------- Run time (seconds) = 0.88 Number of iterations = 4 ------------------------------------------------------------------------------ | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- Contrast 1 | cons_1 | -1.398436 .0537743 -26.01 0.000 -1.503831 -1.29304 -------------+---------------------------------------------------------------- Contrast 2 | cons_2 | -.701469 .0456439 -15.37 0.000 -.7909294 -.6120086 -------------+---------------------------------------------------------------- Contrast 3 | cons_3 | -.0998058 .043027 -2.32 0.020 -.1841371 -.0154744 -------------+---------------------------------------------------------------- Contrast 4 | cons_4 | .5949758 .0448891 13.25 0.000 .5069947 .6829568 -------------+---------------------------------------------------------------- Contrast 5 | cons_5 | 1.602796 .0574293 27.91 0.000 1.490236 1.715355 ------------------------------------------------------------------------------ . . runmlwin a_point cons, /// > level1(pupil:) /// > discrete(distribution(multinomial) link(ologit) denominator(cons) bas > ecategory(6)) /// > mcmc(on) initsprevious nopause MLwiN 3.05 multilevel model Number of obs = 2166 Ordered multinomial logit response model (hierarchical) Estimation algorithm: MCMC ---------------------------------- Contrast | Log-odds -------------+-------------------- 1 | 1 vs. 2 3 4 5 6 2 | 1 2 vs. 3 4 5 6 3 | 1 2 3 vs. 4 5 6 4 | 1 2 3 4 vs. 5 6 5 | 1 2 3 4 5 vs. 6 ---------------------------------- Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 8.04 Deviance (dbar) = 7726.43 Deviance (thetabar) = 7721.41 Effective no. of pars (pd) = 5.02 Bayesian DIC = 7731.46 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- Contrast 1 | cons_1 | -1.404388 .0539265 241 0.000 -1.510123 -1.299689 -------------+---------------------------------------------------------------- Contrast 2 | cons_2 | -.7062973 .0465722 186 0.000 -.8008548 -.618658 -------------+---------------------------------------------------------------- Contrast 3 | cons_3 | -.1033712 .0436276 186 0.009 -.1893483 -.0176887 -------------+---------------------------------------------------------------- Contrast 4 | cons_4 | .5926903 .0455491 220 0.000 .503162 .6778752 -------------+---------------------------------------------------------------- Contrast 5 | cons_5 | 1.602202 .057449 428 0.000 1.489708 1.71914 ------------------------------------------------------------------------------ . . . . * 13.4 Adding predictor variables . . . . . . . . . . . . . . . . . . . .191 . . runmlwin a_point cons (gcseav gcseav2 gcseav3 female, contrast(1/5)), /// > level1(pupil:) /// > discrete(distribution(multinomial) link(ologit) denominator(cons) bas > ecategory(6)) nopause MLwiN 3.05 multilevel model Number of obs = 2166 Ordered multinomial logit response model (hierarchical) Estimation algorithm: IGLS, MQL1 ---------------------------------- Contrast | Log-odds -------------+-------------------- 1 | 1 vs. 2 3 4 5 6 2 | 1 2 vs. 3 4 5 6 3 | 1 2 3 vs. 4 5 6 4 | 1 2 3 4 vs. 5 6 5 | 1 2 3 4 5 vs. 6 ---------------------------------- Run time (seconds) = 1.11 Number of iterations = 6 ------------------------------------------------------------------------------ | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- Contrast 1 | cons_1 | -1.868101 .083689 -22.32 0.000 -2.032128 -1.704074 -------------+---------------------------------------------------------------- Contrast 2 | cons_2 | -.8270784 .0719785 -11.49 0.000 -.9681536 -.6860032 -------------+---------------------------------------------------------------- Contrast 3 | cons_3 | .1383848 .0689091 2.01 0.045 .0033255 .2734442 -------------+---------------------------------------------------------------- Contrast 4 | cons_4 | 1.304845 .0759066 17.19 0.000 1.156071 1.45362 -------------+---------------------------------------------------------------- Contrast 5 | cons_5 | 2.995239 .1032021 29.02 0.000 2.792967 3.197512 -------------+---------------------------------------------------------------- gcseav_12345 | -2.077311 .0947173 -21.93 0.000 -2.262953 -1.891669 gcseav~12345 | -.4622603 .0521833 -8.86 0.000 -.5645377 -.3599829 gcseav~12345 | -.0481332 .0365272 -1.32 0.188 -.1197251 .0234588 female_12345 | .7544017 .0839844 8.98 0.000 .5897952 .9190081 ------------------------------------------------------------------------------ . . runmlwin a_point cons (gcseav gcseav2 gcseav3 female, contrast(1/5)), /// > level1(pupil:) /// > discrete(distribution(multinomial) link(ologit) denominator(cons) bas > ecategory(6)) /// > mcmc(on) initsprevious nopause MLwiN 3.05 multilevel model Number of obs = 2166 Ordered multinomial logit response model (hierarchical) Estimation algorithm: MCMC ---------------------------------- Contrast | Log-odds -------------+-------------------- 1 | 1 vs. 2 3 4 5 6 2 | 1 2 vs. 3 4 5 6 3 | 1 2 3 vs. 4 5 6 4 | 1 2 3 4 vs. 5 6 5 | 1 2 3 4 5 vs. 6 ---------------------------------- Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 11.9 Deviance (dbar) = 6099.86 Deviance (thetabar) = 6090.96 Effective no. of pars (pd) = 8.90 Bayesian DIC = 6108.76 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- Contrast 1 | cons_1 | -1.883893 .0818101 170 0.000 -2.042458 -1.724321 -------------+---------------------------------------------------------------- Contrast 2 | cons_2 | -.8386675 .0719557 144 0.000 -.980139 -.7002914 -------------+---------------------------------------------------------------- Contrast 3 | cons_3 | .1281623 .067356 157 0.028 -.0029563 .2610732 -------------+---------------------------------------------------------------- Contrast 4 | cons_4 | 1.296688 .0730275 187 0.000 1.155459 1.438708 -------------+---------------------------------------------------------------- Contrast 5 | cons_5 | 2.987038 .1013874 294 0.000 2.788264 3.182985 -------------+---------------------------------------------------------------- gcseav_12345 | -2.079406 .0986176 220 0.000 -2.276322 -1.88424 gcseav~12345 | -.4542245 .0507463 265 0.000 -.5512939 -.3553254 gcseav~12345 | -.0498362 .0391458 209 0.088 -.128801 .0267007 female_12345 | .7573509 .0824371 271 0.000 .5999215 .9225242 ------------------------------------------------------------------------------ . . . . * 13.5 Multilevel ordered response modelling . . . . . . . . . . . . . . 192 . . egen school = group(lea estab) . // Note: Establishment codes on their own do not uniquely identify schools. . // Schools are instead uniquely identified by LEA code, establishment ID . // combination. Thus, here we generated a unique school ID. . . runmlwin a_point cons (gcseav gcseav2 female, contrast(1/5)), /// > level2(school: (cons, contrast(1/5))) /// > level1(pupil:) /// > discrete(distribution(multinomial) link(ologit) denominator(cons) bas > ecategory(6) pql2) nopause MLwiN 3.05 multilevel model Number of obs = 2166 Ordered multinomial logit response model (hierarchical) Estimation algorithm: IGLS, PQL2 ----------------------------------------------------------- | No. of Observations per Group Level Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ school | 220 1 9.8 94 ----------------------------------------------------------- ---------------------------------- Contrast | Log-odds -------------+-------------------- 1 | 1 vs. 2 3 4 5 6 2 | 1 2 vs. 3 4 5 6 3 | 1 2 3 vs. 4 5 6 4 | 1 2 3 4 vs. 5 6 5 | 1 2 3 4 5 vs. 6 ---------------------------------- Run time (seconds) = 1.61 Number of iterations = 10 ------------------------------------------------------------------------------ | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- Contrast 1 | cons_1 | -1.96551 .1092139 -18.00 0.000 -2.179565 -1.751454 -------------+---------------------------------------------------------------- Contrast 2 | cons_2 | -.7743616 .0992623 -7.80 0.000 -.9689122 -.579811 -------------+---------------------------------------------------------------- Contrast 3 | cons_3 | .3175344 .0975968 3.25 0.001 .1262482 .5088205 -------------+---------------------------------------------------------------- Contrast 4 | cons_4 | 1.602257 .1044415 15.34 0.000 1.397556 1.806959 -------------+---------------------------------------------------------------- Contrast 5 | cons_5 | 3.431818 .1287165 26.66 0.000 3.179539 3.684098 -------------+---------------------------------------------------------------- gcseav_12345 | -2.295235 .0711587 -32.26 0.000 -2.434703 -2.155766 gcseav~12345 | -.4650907 .0467127 -9.96 0.000 -.556646 -.3735355 female_12345 | .7484153 .0938655 7.97 0.000 .5644424 .9323882 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ Level 2: school | var(cons_12345) | .6596637 .1107802 .4425385 .8767888 ------------------------------------------------------------------------------ . . runmlwin a_point cons (gcseav gcseav2 female, contrast(1/5)), /// > level2(school: (cons, contrast(1/5))) /// > level1(pupil:) /// > discrete(distribution(multinomial) link(ologit) denominator(cons) bas > ecategory(6)) /// > mcmc(on) initsprevious nopause MLwiN 3.05 multilevel model Number of obs = 2166 Ordered multinomial logit response model (hierarchical) Estimation algorithm: MCMC ----------------------------------------------------------- | No. of Observations per Group Level Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ school | 220 1 9.8 94 ----------------------------------------------------------- ---------------------------------- Contrast | Log-odds -------------+-------------------- 1 | 1 vs. 2 3 4 5 6 2 | 1 2 vs. 3 4 5 6 3 | 1 2 3 vs. 4 5 6 4 | 1 2 3 4 vs. 5 6 5 | 1 2 3 4 5 vs. 6 ---------------------------------- Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 14.4 Deviance (dbar) = 5814.59 Deviance (thetabar) = 5692.04 Effective no. of pars (pd) = 122.55 Bayesian DIC = 5937.14 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- Contrast 1 | cons_1 | -1.923212 .1229307 63 0.000 -2.152823 -1.671016 -------------+---------------------------------------------------------------- Contrast 2 | cons_2 | -.767638 .1160738 48 0.000 -.9890748 -.5330881 -------------+---------------------------------------------------------------- Contrast 3 | cons_3 | .300251 .1138173 48 0.003 .0875123 .5349658 -------------+---------------------------------------------------------------- Contrast 4 | cons_4 | 1.56449 .1215162 55 0.000 1.346591 1.81906 -------------+---------------------------------------------------------------- Contrast 5 | cons_5 | 3.363311 .140462 73 0.000 3.099479 3.653081 -------------+---------------------------------------------------------------- gcseav_12345 | -2.263649 .0684852 337 0.000 -2.405055 -2.122373 gcseav~12345 | -.4578595 .0504218 218 0.000 -.5584839 -.3565204 female_12345 | .7412699 .0985752 210 0.000 .5442226 .9299094 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 2: school | var(cons_12345) | .6442749 .1402424 208 .3916605 .9493606 ------------------------------------------------------------------------------ . . runmlwin a_point cons (gcseav gcseav2 female, contrast(1/5)), /// > level2(school: (cons gcseav, contrast(1/5))) /// > level1(pupil:) /// > discrete(distribution(multinomial) link(ologit) denominator(cons) bas > ecategory(6)) nopause MLwiN 3.05 multilevel model Number of obs = 2166 Ordered multinomial logit response model (hierarchical) Estimation algorithm: IGLS, MQL1 ----------------------------------------------------------- | No. of Observations per Group Level Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ school | 220 1 9.8 94 ----------------------------------------------------------- ---------------------------------- Contrast | Log-odds -------------+-------------------- 1 | 1 vs. 2 3 4 5 6 2 | 1 2 vs. 3 4 5 6 3 | 1 2 3 vs. 4 5 6 4 | 1 2 3 4 vs. 5 6 5 | 1 2 3 4 5 vs. 6 ---------------------------------- Run time (seconds) = 1.22 Number of iterations = 8 ------------------------------------------------------------------------------ | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- Contrast 1 | cons_1 | -1.779416 .097665 -18.22 0.000 -1.970836 -1.587996 -------------+---------------------------------------------------------------- Contrast 2 | cons_2 | -.7340901 .0891126 -8.24 0.000 -.9087475 -.5594327 -------------+---------------------------------------------------------------- Contrast 3 | cons_3 | .2367004 .0876772 2.70 0.007 .0648562 .4085446 -------------+---------------------------------------------------------------- Contrast 4 | cons_4 | 1.406258 .0940467 14.95 0.000 1.22193 1.590586 -------------+---------------------------------------------------------------- Contrast 5 | cons_5 | 3.080954 .1169318 26.35 0.000 2.851772 3.310136 -------------+---------------------------------------------------------------- gcseav_12345 | -2.106252 .0699045 -30.13 0.000 -2.243263 -1.969242 gcseav~12345 | -.4236112 .0464491 -9.12 0.000 -.5146498 -.3325727 female_12345 | .6798565 .0909794 7.47 0.000 .5015402 .8581727 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ Level 2: school | var(gcseav_12345) | .0570307 .0506351 -.0422122 .1562736 cov(gcseav_12345,cons_12345) | -.0288127 .0448175 -.1166534 .0590279 var(cons_12345) | .390208 .0811649 .2311277 .5492883 ------------------------------------------------------------------------------ . . matrix b = e(b) . . matrix V = e(V) . . runmlwin a_point cons (gcseav gcseav2 female, contrast(1/5)), /// > level2(school: (cons gcseav, contrast(1/5))) /// > level1(pupil:) /// > discrete(distribution(multinomial) link(ologit) denominator(cons) bas > ecategory(6)) /// > mcmc(on) initsb(b) initsv(V) nopause MLwiN 3.05 multilevel model Number of obs = 2166 Ordered multinomial logit response model (hierarchical) Estimation algorithm: MCMC ----------------------------------------------------------- | No. of Observations per Group Level Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ school | 220 1 9.8 94 ----------------------------------------------------------- ---------------------------------- Contrast | Log-odds -------------+-------------------- 1 | 1 vs. 2 3 4 5 6 2 | 1 2 vs. 3 4 5 6 3 | 1 2 3 vs. 4 5 6 4 | 1 2 3 4 vs. 5 6 5 | 1 2 3 4 5 vs. 6 ---------------------------------- Burnin = 500 Chain = 5000 Thinning = 1 Run time (seconds) = 18.5 Deviance (dbar) = 5779.81 Deviance (thetabar) = 5631.22 Effective no. of pars (pd) = 148.59 Bayesian DIC = 5928.40 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- Contrast 1 | cons_1 | -1.967659 .1048241 119 0.000 -2.176247 -1.757285 -------------+---------------------------------------------------------------- Contrast 2 | cons_2 | -.7902522 .0958267 91 0.000 -.9742514 -.5973452 -------------+---------------------------------------------------------------- Contrast 3 | cons_3 | .2868334 .0984627 86 0.002 .0974824 .487875 -------------+---------------------------------------------------------------- Contrast 4 | cons_4 | 1.55977 .1049519 82 0.000 1.350205 1.755209 -------------+---------------------------------------------------------------- Contrast 5 | cons_5 | 3.374722 .1258954 90 0.000 3.117439 3.622964 -------------+---------------------------------------------------------------- gcseav_12345 | -2.309743 .0809322 240 0.000 -2.470658 -2.150604 gcseav~12345 | -.4415123 .0499938 262 0.000 -.5366144 -.3431703 female_12345 | .7523239 .1004863 253 0.000 .5589982 .9437343 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 2: school | var(gcseav_12345) | .1347979 .0634532 30 .0415996 .2769244 cov(gcseav_12345,cons_12345) | -.0277829 .0629916 90 -.1463858 .1010601 var(cons_12345) | .6119321 .1280398 232 .4039992 .901745 ------------------------------------------------------------------------------ . . mcmcsum [RP2]var(cons_12345), detail [RP2]var(cons_12345) ------------------------------------------------------------------------------ Percentiles Mean .6119321 0.5% .3627953 Thinned Chain Length 5000 MCSE of Mean .0050987 2.5% .4039992 Effective Sample Size 232 Std. Dev. .1280398 5% .4271141 Raftery Lewis (2.5%) 14991 Mode .5762605 25% .5203051 Raftery Lewis (97.5%) 20156 P(mean) 0.000 Brooks Draper (mean) 19974 P(mode) 0.000 50% .5974395 P(median) 0.000 75% .6897111 95% .8431565 97.5% .9017451 99.5% 1.001883 ------------------------------------------------------------------------------ . . mcmcsum [RP2]var(cons_12345), fiveway . . runmlwin a_point cons (gcseav gcseav2 female, contrast(1/5)), /// > level2(school: (cons gcseav, contrast(1/5))) /// > level1(pupil:) /// > discrete(distribution(multinomial) link(ologit) denominator(cons) bas > ecategory(6)) /// > mcmc(chain(50000)) initsb(b) initsv(V) nopause MLwiN 3.05 multilevel model Number of obs = 2166 Ordered multinomial logit response model (hierarchical) Estimation algorithm: MCMC ----------------------------------------------------------- | No. of Observations per Group Level Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ school | 220 1 9.8 94 ----------------------------------------------------------- ---------------------------------- Contrast | Log-odds -------------+-------------------- 1 | 1 vs. 2 3 4 5 6 2 | 1 2 vs. 3 4 5 6 3 | 1 2 3 vs. 4 5 6 4 | 1 2 3 4 vs. 5 6 5 | 1 2 3 4 5 vs. 6 ---------------------------------- Burnin = 500 Chain = 50000 Thinning = 1 Run time (seconds) = 121 Deviance (dbar) = 5782.50 Deviance (thetabar) = 5635.69 Effective no. of pars (pd) = 146.81 Bayesian DIC = 5929.30 ------------------------------------------------------------------------------ | Mean Std. Dev. ESS P [95% Cred. Interval] -------------+---------------------------------------------------------------- Contrast 1 | cons_1 | -1.935184 .1109967 808 0.000 -2.151235 -1.716856 -------------+---------------------------------------------------------------- Contrast 2 | cons_2 | -.7589331 .1012194 672 0.000 -.9535179 -.5596866 -------------+---------------------------------------------------------------- Contrast 3 | cons_3 | .3175658 .1005184 653 0.001 .1245158 .5152853 -------------+---------------------------------------------------------------- Contrast 4 | cons_4 | 1.586157 .1080931 713 0.000 1.378924 1.802836 -------------+---------------------------------------------------------------- Contrast 5 | cons_5 | 3.397214 .1337269 899 0.000 3.138748 3.66185 -------------+---------------------------------------------------------------- gcseav_12345 | -2.305509 .0811559 2156 0.000 -2.467319 -2.149673 gcseav~12345 | -.4466862 .051015 3343 0.000 -.546476 -.3477467 female_12345 | .7364532 .0958199 2381 0.000 .5488649 .9208812 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int] -----------------------------+------------------------------------------------ Level 2: school | var(gcseav_12345) | .119631 .0721667 231 .0233512 .2968889 cov(gcseav_12345,cons_12345) | -.0304984 .0670016 699 -.1668845 .1002019 var(cons_12345) | .6213171 .1311701 2046 .3982849 .9113882 ------------------------------------------------------------------------------ . . mcmcsum [RP2]var(cons_12345), detail [RP2]var(cons_12345) ------------------------------------------------------------------------------ Percentiles Mean .6213171 0.5% .3486633 Thinned Chain Length 50000 MCSE of Mean .0016958 2.5% .3982849 Effective Sample Size 2046 Std. Dev. .1311701 5% .4275128 Raftery Lewis (2.5%) 10289 Mode .5937193 25% .5285461 Raftery Lewis (97.5%) 8718 P(mean) 0.000 Brooks Draper (mean) 22094 P(mode) 0.000 50% .6096913 P(median) 0.000 75% .701248 95% .8553421 97.5% .9113882 99.5% 1.031963 ------------------------------------------------------------------------------ . . mcmcsum [RP2]var(cons_12345), fiveway . . . . * Chapter learning outcomes . . . . . . . . . . . . . . . . . . . . . . .196 . . . . . . **************************************************************************** . exit end of do-file