Multilevel model using long data and ... PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Jielu Lin posted on Wednesday, September 24, 2008 - 6:51 am
Dear Drs. Muthen,

I am doing a two-level growth model for a continuous outcome using long data format (like example 9.16). I want to obtain the residuals but the "output: residual" command is not available for "type = random". Is there anyway to get the residuals? Thanks!

This is my code:

variables:
names = y id time;
cluster = id;
within = time;

analysis:
type = twolevel random;

model:
%within%
s | y on time;
%between%
y s
 Linda K. Muthen posted on Wednesday, September 24, 2008 - 10:11 am
The variance of y varies as a function of time. Therefore, there is not one covariance matrix. This is why the RESIDUAL option is not available.
 Jielu Lin posted on Wednesday, September 24, 2008 - 9:30 pm
Thanks for answering my question!

I did a fix-random effects model in STATA using the "xmixed" procedure and could obtain a global residual using "predict r, resid".I want to replicate this in mplus.

Just want to make sure--Do you mean that mplus won't produce a global residual like the structural equation model growth curves? Thanks!
 Bengt O. Muthen posted on Thursday, September 25, 2008 - 8:59 am
You say your STATA analysis used "a fix-random effects model". I don't know if that means fixed slopes only or also random slopes. If there are no random slopes for covariates, Mplus does give a global residual for the outcome at each time point.
 Jielu Lin posted on Friday, September 26, 2008 - 6:11 am
Got it. Thank you!
 Jielu Lin posted on Monday, September 29, 2008 - 11:07 am
New question:
Now I am doing random intercepts only and as you indicated, this gives me a global residual. Is there anyway to get the actual numbers of the residual? I want to do a histogram to see how these residuals are distributed. Thanks!
 Linda K. Muthen posted on Monday, September 29, 2008 - 2:57 pm
We don't give individual residuals.
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: