Random slope with fixed intercept PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
 CMW posted on Tuesday, September 13, 2005 - 11:15 am

I would like to fit a 2-level logistic regression model with one level-1 predictor.
I would like the slope to be random, but the intercept to be fixed.

I think the code below fits a model with random intercept and random slope. By the way, is this code correct for specifying that the intercept has one predictor and the slope does not have any predictors, at level 2?

And to my main question: How can I make it so the intercept is predicted by "eap" but is fixed (i.e., no error at level 2)?

names are subject t b eap;
categorical = t;
between = eap;
within = b;
cluster = subject;

type = twolevel random;

slope | t on b;
t on eap; !t refers to random intercept
slope; !no predictors of random slope
 bmuthen posted on Tuesday, September 13, 2005 - 4:29 pm
Regarding your main question, you use statement on Between


If you don't want t to vary at all on the between level - no even as a function of eap - you simply put it on the WITHIN = list and don't mention it on Between.

To answer your first question, yes, the code is correct for what you say.
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