Hello, I am trying to use the Montecarlo command to impute 500 missing data files, 100 times each.

Is there a way to have Mplus impute the first data set and output those files in its own folder, and do the same for the 2nd missing data set and output to its own folder, and continue on for all 500 files.

The MONTECARLO command does not impute missing data files. It generates data according to population parameter values for certain specified sample sizes.

If you want to create imputed data sets, use the DATA IMPUTATION command. These data sets can be analyzed in the same run where they are created or saved for later analysis. You can specify the directory in which they are saved.

I have written out code in MPlus, that creates .inp files for MPlus, that will do the imputations. In my R code I have written in a loop that will go through all of my reps. However there is a breakdown between Mplus and R. I keep getting errors in MPlus, Not R. Also when I open the file in Mplus it runs correctly. Have you ever come across this problem?

I have a question about using categorical variables in data imputation under an unrestricted H1 model (where all variables are treated as Y outcomes). In terms of predicting values for the categorical variables, are they treated as ordered categorical or nominal variables? And if they are treated as ordered categorical, is there a way of performing such multiple imputations with nominal variables?

I have two questions regarding multiple imputation. My model uses the WLSMV estimator and I also included sample weights.

1. After running the imputation with 20 imputed datasets in a TYPE=IMPUTATION, I am now interested in the correlations between all variables in the model. Therefore, I added ‘analysis: type=basic’ with no MODEL command. Besides ‘normal’ correlation values, I get implausible S.E. values (999.000 and 8179.653) for both dichotomous exogenous variables. I have checked the data files but cannot find any inconsistencies. Do you have any suggestions what might cause this problem?

2. After running the imputation I am also interested in total effects. So I used the 'model indirect' command but only got the error message ‘MODEL INDIRECT is not allowed with TYPE=IMPUTATION’. Is there any other possibility to get them?

Thank you very much. I have just used MODEL CONSTRAINT and did well to get unstandardized total effects. Now, I need to calculate the standardized effects. To do so I had a look on Example 5.20 in the user guide. But I am not sure if I adapted the example correctly. Therefore, may I ask: 1. Assume x1 influences y directly but also via x2. Is it correct to calculate the standardized coefficient for each path involved (formula: stdxy = b*(sd(x)/sd(y)) and then to integrate these coefficients obtained in the formula 'Total= indirect x1x2 * indirect x2y + direct x1y'?

Translated into the input this would be: total_yx1=(x2x1*SQRT(x1)/SQRT(x2))*(yx2*SQRT(x2)/SQRT(y)) +(yx1*SQRT(x1)/SQRT(y));

2. If that is correct, would I use STDY=b/SD(y) if the one path involves an independent binary variable? 3. As my model contains binary variables as well, I cannot calculate their variance. When using PARAMETERIZATION = THETA; I do not get any results. What could I do in this case?

I have found a solution for the first and third question. Sorry if these questions were too simple. But one question remains: When calculating standardized total respectively indirect effects, how can I deal with a path that includes a binary independent variable among other paths with continuous dependent and independent variables? Is it allowed calculate STDY*STDYX*STDYX, for example?

Thank you very much for your reply. I am not sure if I understood your answer correctly. You would first calculate the total effects with the unstandardized coefficients and then standardize that total effect obtained? I am not sure by which formula this could be done. Could you please give me some advice?

And if I first have to calculate the total effect by unstandardized coefficients and then standardize it, I am not sure to what extent the answer to my second post is relevant. Couldn’t I just simply use the standardized coefficients obtained (STDYX and STDY if the covariate is binary) and calculate the total effects just as usual by the product of the indirect effects + the direct effect? But then, if I haven't misunderstood your second post, a problem might be that my model really does not only contain binary variables in x but also in m. Additionally, y is binary. Therefore, I am already using WLSMV. Which considerations have to be made in this case?

You use the regular standardization formula on the total unstand'd value, namely divide by the SD of the DV and multiply (unless binary IV) by the SD of the IV.

Paragraph 2:

Not sure where we miscommunicate here. When the indirect effect is computed as a product, you use the product of unstandardized values, not standardized values. You can then standardize that product using the answer for Paragraph 1.

I am also saying that If the binary variable is either m or y, special considerations are needed. With WLSMV such indirect effects are considering continuous latent response variables, not the corresponding binary observed variables. For more information, see

Muthén, B. (2011). Applications of causally defined direct and indirect effects in mediation analysis using SEM in Mplus. Click here to view the Technical appendix that goes with this paper and click here for the Mplus input appendix. Click here to view Mplus inputs, data, and outputs used in this paper.

Thank you very much, Prof. Muthén, for your detailed answer. Maybe my confusion is with the terms total effect and indirect effect. At the moment I am solely interested in calculating total effects. So your answer regarding Paragraph 1 should be relevant for me (calculating total effects by unsandardized coefficients and then standardize it). And this is also correct if I am using WLSMV?

Yes, where the same qualification as before holds also for the total effect:

I am also saying that If the binary variable is either m or y, special considerations are needed. With WLSMV such indirect effects are considering continuous latent response variables, not the corresponding binary observed variables. For more information, see...

Are imputed values for one variable used to impute other values during multiple impuation? For example, would imputed values of variable x1 be used in imputing the values of variable x2 in the same imputation model?

I am trying to do a Bayesian multiple imputation. However, I always got the warning that "THERE IS NOT ENOUGH MEMORY SPACE TO RUN Mplus ON THE CURRENT INPUT FILE." I have tried it on several computers(enough memory space) with both the 32-bit and the 64-bit version. But I still could not get the imputed file. However, it ran normally if I deleted the auxiliary variables. Here below is my syntax.

DATA: FILE IS "ProblemSolvingSEMParceled.dat";

VARIABLE: NAMES are Gender Age Group v1-v15; USEVARIABLES are Gender Age Group v1-v15; Auxiliary are v1-v5(m); Missing is ALL(999999);