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.
In the end i would then like to analyze all 500 folders at once.
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?