2 Questions about Monte Carlo Simulat... PreviousNext
Mplus Discussion > Confirmatory Factor Analysis >
Message/Author
 Jengshin Wu posted on Sunday, March 09, 2014 - 6:31 pm
Q2, I can't used the commend "DEFINE" in Monte Carlo environment for furhter manipulate data? I mean, we will check the effect of coarsed scale. So, we need a simulation with continuuos data, and another simulation with categorcal data obtained form previus continuous. Then, I add the following commands in above mplus code.
-----------
DEFINE:
IF(R1>3)THEN R1=5;
IF(1<R1 AND R1<=3)THEN R1=4;
IF(-1<R1 AND R1<=1)THEN R1=3;
IF(-3<R1 AND R1<=-1)THEN R1=2;
IF(R1<=-3)THEN R1=1;
----------
But, it shows
*** ERROR in DEFINE command
The DEFINE command is not available in conjuction with the MONTECARLO command.

Is there other methods to do this?

Sam
 Linda K. Muthen posted on Monday, March 10, 2014 - 8:27 am
You can use the DEFINE command with external Monte Carlo. See Example 12.6.
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: