I have a quick question and was having difficulty adapting the manual examples for these purposes. I was wanting to create a monte carlo situation where Y is regressed on X in 3 separate groups. I would like to set the slopes different in each group (e.g., .60 for group 1, .30 in group 2, 0.0 in group 3).
I had run a model before similar to this and used the following code, defining a categorical variable with levels "high" "med" and "low":
Model: y on x;
Model high: y on x (a1);
Model med: y on x (a2);
Model low: y on x (a3);
How would I run a monte carlo simulation of something like that? Is there any code I could reference / adapt?
Hi Prof. Muthen i want to change the values of observed variables in the previous example of simulation data to ordered categorical and dichotomous. i hope to give me also an example of simulation data in multiple group SEMs with ordered categorical and dichotomous.
All of the user's guide examples come with Monte Carlo counterparts. Example 5.16 is multiple group with binary items. You can extend the binary items to ordered categorical. See the GENERATE option of the MONTECARLO command.