Correct multilevel multigroup model? PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
 patelrj posted on Wednesday, August 10, 2011 - 4:03 am
Dear readers,

I am slightly confused how to define a multilevel model, especially what to put in the between model. So far, I've copied the within model and added a between level predictor.

I'm analysing a model in which nigh all variables are measured at the within level, and only one variable is measured at the between. All within variables have high ICC's (> .10).

I'm wondering if my syntax is correct when I want to model:
(1) random intercepts for all within variables
(2) no random slopes
(3) equal models for all groups

VARIABLE: NAMES ARE Clus Group w X1 X2 X3 Y M1 M2 M3;
GROUPING IS Group (0=g1 1=g2 2=g3);


Y ON M1 M2 M3;
M1 ON X2;
M2 ON X2 X3;
M3 ON X3;
X2 ON X1;
X3 ON X1;
X2 with X3;
M1 WITH M2 M3;

Y ON M1 M2 M3;
M1 ON X2 w;
M2 ON X2 X3 w;
M3 ON X3;
X2 ON X1 w;
X3 ON X1 w;
X2 with X3;
M1 WITH M2 M3;

I get no error messages, and nice fit measures, but I'm not sure if I defined my model properly
 Linda K. Muthen posted on Wednesday, August 10, 2011 - 10:46 am
The models specified on within and between should be guided by your research questions and hypotheses.

(1) Yes.
(2) Yes. Example 9.2 shows a random slope model.
(3) There are no equalities in your model. Structural parameters are not held equal across groups as the default.

I would not use MUML. I would use the default estimator.
 patelrj posted on Thursday, August 11, 2011 - 3:14 am
Dear dr. Muthen,

thank you very much for your clear reply. I've added equality constraints to my model, and found all hypothetical links homogeneous between groups, except for one; but the scale used there is very unreliable, so I'm inclined to point to power problems before I theorize a lot about it.

Due to very unequal cluster sizes (unequal classroom composition) I used MUML to handle that type of data. Is it ok to use it in this instance?
 Linda K. Muthen posted on Friday, August 12, 2011 - 8:46 am
MUML has no advantage with unequal cluster sizes. In fact, it has a disadvantage. When cluster sizes are equal, MUML is ML. When they are not, it is not ML.
 dummyvariable123 posted on Tuesday, July 30, 2019 - 7:35 am
Dear Dr Muthen,

I am confused how to define a 3-level model (L1 within-person, L2 between-person, L3 between classroom) with a grouping command. I am interested in gender differences in effects of X on Y on Level 2.

CLUSTER = id class;
GROUPING=gender (0=boy, 1=girl);
between (id) = X_centered gender;
between = (class) = X_samplecentered;
within=time X_classcentered;


Y ON X_centered;
s1 |Y ON time;

%between id%
s1 WITH Y;

%between boy%
Y ON X_samplecentered;
s1 ON X_samplecentered;
%between girl%
Y ON X_samplecentered;
s1 ON X_samplecentered;

%between class%
s1 WITH Y;
Y ON X_classcentered;
 Tihomir Asparouhov posted on Wednesday, July 31, 2019 - 9:32 pm
The easiest way to do this is this - instead of

%between boy%
Y ON X_samplecentered;
s1 ON X_samplecentered;
%between girl%
Y ON X_samplecentered;
s1 ON X_samplecentered;


Y S1 on gender X_samplecentered interaction;

where the interaction variable would be defined by

Define: interaction=gender*X_samplecentered;
 dummyvariable123 posted on Thursday, August 01, 2019 - 1:19 am
Dear Dr. Asparuhov,

Thank you for your response.

1. Is this way correct even though my moderator is dichotomous (boys/girls)? The interpretation would be then, the more someone is a girl, the more predictor affects the outcome...?

2. For the moderation to take place, the interaction term has to be significant. But what about the model fit? Can I compare the fit of a model with freely estimated path from the interaction term to the outcome with a model where this path is constrained to zero?

Thank you again for your guidance!
 Tihomir Asparouhov posted on Thursday, August 01, 2019 - 10:00 am
1. If gender=1 for girl and 0 for boy then
the intercept Y is interpreted as the intercept for group boy, while the intercept for group girl would be [Y] + Y on gender. Similarly, Y on X is the coefficient for boy and the coefficient for girl is Y on X + Y on interaction.

2. Yes. Such a test would be equivalent to testing equality of the regression coefficient Y on X between the two groups.
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message