Hello, I am conducting a simulation study using Latent Growth Curves. I based the initial code from example 12.2 in the user manual. However, I need to restrict the range for one of the predictor (x1) variables (i.e. a value between 0-9). Ideally, I would like an even distribution of those numbers. I tired using the GENERATE command and making x1 an ordered categorical variable. None of my attempts have worked. Could you direct me to the appropriate code that would solve my problem? Thank you in advance. -Jones
This was very helpful. Thank you. However, I think I am still missing something. I need the uniformly "clustered" variable as the IV affecting the growth factors. When I run the below syntax, 6 variables are created and it looks like the clustered variable is not congruent with the population model (based on Step two of 12.6). Thank you again for the help. MONTECARLO: NAMES ARE y1-y4 age; NOBSERVATIONS = 500; NREPS = 500; SEED = 4533; NCSIZES = 10; CSIZES = 1 (50) 1 (50) 1 (50) 1 (50) 1 (50) 1 (50) 1 (50) 1 (50) 1 (50) 1 (50); REPSAVE = ALL; SAVE = test1_rep_*.dat; MODEL POPULATION: %WITHIN% iw sw | y1@0y2@1y3@2y4@3; y1-y4*.5; iw ON age*0; sw ON age*.5; iw*1; sw*.2; %BETWEEN% ib sb | y1@0y2@1y3@2y4@3; y1-y4@0; ib ON age*0; sb ON age*.5; [ib*10 sb*2]; ib*1; sb*.2; ANALYSIS: TYPE = TWOLEVEL; MODEL: %WITHIN% Same as above %BETWEEN% Same as above OUTPUT: TECH8 TECH9;
I assume your "age" variable is your IV that you want equal probs for. You should put that variable on the Categorical list and give it thresholds that provide equal category probabilities. See Monte Carlo versions of the UG examples on our website for how to generate categorical variables.
When I try that, I get the following error message: The CATEGORICAL option is used for dependent variables only. The following variable is an independent variable in the model. Problem with: AGE I have looked at the MONTE CARLO COMMAND in Chapter 19 as well, still unsure on how to specify an IV as Ordered Categorical. Thank you for the continued help.