Constrain TSCORES in a Monte Carlo Gr... PreviousNext
Mplus Discussion > Growth Modeling of Longitudinal Data >
 John Flournoy posted on Tuesday, September 24, 2013 - 3:43 pm
I am trying to build a Monte Carlo simulation to reflect a growth curve model of an accelerated longitudinal design. Each participant is measured at 3 timepoints, but they may begin the study at any age between 20 and 60.

The important point with respect to Monte Carlo in Mplus is that I would like to sample their ages from a normal distribution for the first TSCORE variable, but each subsequent TSCORE variable should just be a linear transformation of the first one.

The syntax as I have it is below. The problem with it is that as set up now I get unrealistic values for each of the three TSCORE variables that are supposed to reflect age.

Thanks for any help!

NAMES ARE scale1-scale3 age1-age3;
NREPS = 500;
SEED = 123;
MISSING = scale2 scale3;
Tscores = age1(0 10) age2(1 10) age3(2 10);
SAVE = mc1-rep*.dat
i s | scale1-scale3 AT age1-age3;
[i*1 s*.25];
i*30; s*.15; i WITH s*-.5;
[scale2@-1 scale3@-.74];
i s | scale1-scale3 AT age1-age3;
scale1 scale2 scale3 (1);
 Linda K. Muthen posted on Wednesday, September 25, 2013 - 5:53 pm
The values in parentheses after the time score variables are their means and standard deviations. I think 10 is too large for the standard deviations.
 John Flournoy posted on Wednesday, September 25, 2013 - 6:20 pm
I appreciate the observation. However, I am attempting to simulate a wide range of ages for the first wave -- something like ages 18-65. I want the age at wave 2 and wave 3 to be age at wave 1 plus 1 and 2 years. (The tscores in this case stand in for centered age scores). I know I could have subtle variation about three ages, 1 year apart by reducing the SD in the TSCORES line, but I actually want quite wide variation in each tscore variable--but I want the second two tscore variables to be defined by the first. I hope that makes sense.
 Linda K. Muthen posted on Thursday, September 26, 2013 - 4:21 pm
I do not know of any way to do what you want in the Monte Carlo setting. You might try generating the time scores for the first time point and save the data. Then in a second step use TYPE=MONTECARLO and create the other time scores using the DEFINE command, for example, time 2 = time 1 plus 1. I don't know if this two step procedure would be statistically correct however.
 John Flournoy posted on Thursday, September 26, 2013 - 8:58 pm
Thank you much for your time!
 John Flournoy posted on Thursday, September 26, 2013 - 10:35 pm
Do you know if there is a way to generate the data without estimating the models?

 Linda K. Muthen posted on Friday, September 27, 2013 - 12:25 am
See Step 1 of Example 12.6.
 John Flournoy posted on Friday, September 27, 2013 - 9:05 pm
Thank you. One last question, somewhat related: Is there a way to constrain the values of continuous variables? For example, the scale variables in the above syntax should have a range between 0 and 100. I was exploring the GENERATE command, but couldn't find much info on it.

Thanks again.
 Linda K. Muthen posted on Friday, September 27, 2013 - 9:48 pm
There is no way to specify the range for the generation of a continuous variable. You can give the mean, variance, and covariance with other variables. See the GENERATE option in the user's guide.
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