In a simple two group analysis I want to generate data for y1, a continuous (observed or latent) outcome, that is regressed on z1, an independent continuous (observed and/or latent) covariate, within each group. I want to study what happens if z1, the covariate, is ignored in the analysis. I. e. I want to do a two group meanstructure analysis without the covariate, simply comparing the two group means of y1. Do I have to generate the data externally for this? So far I get warnings that z1 does not covary with any other variable, if I do not mention it in the ANALYSIS option (it is howerver used in the MONTECARLO option to generate y1).
If you want to use a subset of the variables that are generated in the analysis, you need to use the external Monte Carlo facility. See Example 11.6. You would use the USEVARIABLES option to select all by the z1 variable.
Felix Flory posted on Wednesday, May 17, 2006 - 8:40 am
Thank you so much for you help - that was exactly what I wanted to confirm!
I am interested in running a Monte Carlo study examining moderated multiple regression (interaction terms in a regression model). Although regression is a very basic analysis in Mplus, I cannot seem to figure out a way to obtain an interaction term in a Monte Carlo. In a typical (i.e., non-simulated) model, you can use DEFINE for this purpose, but this does not appear to work for simulations in Mplus. Is there a way to simply multiply two simulated variables together for use in a Monte Carlo?
I have been thinking that you could use "external" Monte Carlo in Mplus for this, that is, in step 1 you use Mplus MC to generate data sets and then in step 2 (the analysis step) you can use Define to create the interaction. But this then requires creating data with this interaction. So perhaps instead this should be done in regular Mplus MC using XWITH where you put a factor behind each of the 2 x's.