Multilevel Analysis
Currently (i.e. version 6.1), Mplus can estimate two-level models. There can be more than one dependent variable, and the dependent variable/s may be continuous, censored, binary, ordered categorical (ordinal), unordered categorical (nominal), counts, or combinations of these variable types.
Note that by default, robust standard errors are computed. Therefore, the results typically will deviate from the default results obtained via other software. The estimation method may be changed in the analysis section of your input file.
General
Variables on the individual level are typically referred to by WITHIN
; those on the aggregate level by BETWEEN
.
In the VARIABLE
command, you have to indicate which variables are measured on the individual level and which are measured on the aggregate (higher) level. Also, you have to specify which variable indicates the group, or cluster, to which individuals belong; this is accomplished with keyword CLUSTER
. The dependent variable(s) is/are mentioned on the list of variables only.
VARIABLE:
NAMES ARE math homework schsize school;
WITHIN homework;
BETWEEN schsize;
CLUSTER school;
A random intercept model
After having defined the data in the way described above, two further commands are required.
The first command requests a multilevel analysis. Mote that you have to add an ESTIMATOR
subcommand if you wish to use a different estimation method.
ANALYSIS:
TYPE = TWOLEVEL;
The second command defines the within (or individual level) part. The random intercept is computed by default, so there is no need to specify it; the within and between variances are likewise computed by default.
MODEL:
%WITHIN%;
math ON homework;
Random intercept and random slopes
To estimate a model with random slopes, subcommand RANDOM
must be added to the ANALYSIS
section.
ANALYSIS:
TYPE = TWOLEVEL RANDOM;
In the next step, random variables that correspond to the individual level variables have to be defined in the %WITHIN%
part of the model. These random variables then are listed in the %BETWEEN%
part, connected to the dependent variable with keyword ON
. Here is an example with two individual level variables the slopes of which are supposed to vary between groups (in other words, that are supposed to have a random part):
MODEL:
%WITHIN%;
s | math ON homework;
t | math ON white;
%BETWEEN%;
math WITH s t;
In the output, you will find only the individual level variance in the "within level" section. The "between level" section will present the estimated slopes under the heading of "means"; the variances of the intercept and the slopes will be found, appropriately, under the heading of "variances" and the covariances between intercept and slope will be indicated, in this case, as "math with s" and "math with t", respectively.
© W. Ludwig-Mayerhofer, Mplus Guide | Last update: 01 Jul 2011