Do I need to do the same action before using "runmlwin" in stata?
thanks.

Code: Select all
use http://www.bristol.ac.uk/cmm/media/runmlwin/tutorial, clear
runmlwin normexam cons standlrt, level2 (school: cons standlrt) level1 (student: cons) nopause
sort normexam
runmlwin normexam cons standlrt, level2 (school: cons standlrt) level1 (student: cons) nopause
Code: Select all
. use http://www.bristol.ac.uk/cmm/media/runmlwin/tutorial, clear
. runmlwin normexam cons standlrt, level2 (school: cons standlrt) level1 (student: cons) nopause
MLwiN 2.24 multilevel model Number of obs = 4059
Normal response model
Estimation algorithm: IGLS
-----------------------------------------------------------
| No. of Observations per Group
Level Variable | Groups Minimum Average Maximum
----------------+------------------------------------------
school | 65 2 62.4 198
-----------------------------------------------------------
Run time (seconds) = 1.45
Number of iterations = 4
Log likelihood = -4658.4351
Deviance = 9316.8701
------------------------------------------------------------------------------
normexam | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
cons | -.0115052 .039783 -0.29 0.772 -.0894784 .066468
standlrt | .5567305 .019937 27.92 0.000 .5176548 .5958063
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
Level 2: school |
var(cons) | .0904446 .017924 .0553143 .1255749
cov(cons,standlrt) | .0180414 .0067229 .0048649 .031218
var(standlrt) | .0145361 .0044139 .0058851 .0231872
-----------------------------+------------------------------------------------
Level 1: student |
var(cons) | .5536575 .0124818 .5291936 .5781214
------------------------------------------------------------------------------
. sort normexam
. runmlwin normexam cons standlrt, level2 (school: cons standlrt) level1 (student: cons) nopause
The data must be sorted according to the order of the model hierarchy: school student.