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

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)?

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

analysis:
type = twolevel random;

model:
%within%
slope | t on b;
%between%
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

t@0;

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
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: