Multilevel, multiple group with rando... PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Ewan Carr posted on Thursday, September 19, 2013 - 9:49 am
I'm trying to estimate a multilevel model with a single random slope. I want to test if this slope varies across two groups (defined at the individual level).

I'm using KNOWNCLASSES approach to specify groups:



quote:

Analysis:
type = twolevel random mixture;
estimator = mlr;
processors = 2;

MODEL:

%WITHIN%
%OVERALL%
sec1 ON isei;
s | satlife ON sec1;

%BETWEEN%
%OVERALL%
satlife ON rrl gdp;
s ON rrl;


%c#1%
s ON rrl (p1);

%c#2%
s ON rrl (p2);

MODEL TEST: p1 = p2;




However, I get the following error:


quote:

*** ERROR in MODEL command
Parameters involving between-level variables are not allowed to
vary across classes. Parameter: S ON RRL




Is this a limitation of Mplus? Or is there another way of specifying this?

Many thanks,

Ewan
--
 Bengt O. Muthen posted on Friday, September 20, 2013 - 1:56 pm
Your model is a bit problematic in that the random slope s is a between-level variable but you are trying to have it vary across known classes on the individual level.

To do what you are trying to to, you can change the grouping variable to a binary covariate and not use Knownclass. Your model implies that satlife should be regressed on the variables

sec*rr1
sec*rr1*c

which you can define in DEFINE.

Note, however, that you should study the new approaches shown in Mplus Web Note 16 on our website.
 Ewan Carr posted on Monday, September 23, 2013 - 5:30 pm
Thank you Bengt, that's very helpful (as ever).

I mostly understand what you say.

I'm interested in a cross-level interaction, estimated using a random slope.

s | satlife ON rrl

I then want to see if this varies between groups of individuals, defined at the WITHIN level by c.

From what you say, am I right in thinking that I should do the following?


quote:

DEFINE: secXc = sec1*c
MODEL:
%WITHIN%

s | satlife ON secXc;
satlife ON c sec1;

%BETWEEN%

satlife ON rrl gdp;
s ON rrl;




And then plot the predicted values of satlife at different values of c, sec1 and rrl.

This (I think) would allow me to examine the moderating effect of rrl for the two groups separately.

Does that sound correct?

Many thanks,

Ewan
--
 Tihomir Asparouhov posted on Tuesday, September 24, 2013 - 3:57 pm
Try this


variable :
...
within=x1 x2 rrl gdp sec1 isei;

DEFINE:
X1=sec1*rr1;
X2=sec1*rr1*c;

MODEL:
%WITHIN%
sec1 ON isei;
satlife ON rrl gdp x1
x2 (beta);
s | satlife ON sec1;

%BETWEEN%
satlife s;

model test: 0=beta;
 Ewan Carr posted on Friday, October 04, 2013 - 8:21 am
Many thanks, Tihomir that's very helpful.

Just so I'm understanding things correctly:

  1. It doesn't matter that GDP and RRL are defined as WITHIN-level variables (even though they are measured on the BETWEEN-level)?

  2. The MODEL TEST is giving me a test of whether there is a significant difference in the interaction effect (sec1 * rrl) between the two groups (c = 0 and c = 1).


Thanks again for your help with this,

Ewan.
 Tihomir Asparouhov posted on Friday, October 04, 2013 - 12:32 pm
Both Yes.
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: