Monte Carlo Studies PreviousNext
Mplus Discussion > Confirmatory Factor Analysis >
Message/Author
 Anonymous posted on Sunday, June 26, 2005 - 5:39 pm
I am trying to develop a monte carlo study to show some of the robust qualities of CFA with nonnormal data. However, I am having trouble developing datasets that have controlled skewness and kurtosis. Would you provide me with a few syntax lines that will accomplish skewness and separately kurtosis? Also, are there any examples of how to develop skewness and kurtosis into my simulation models? Thank you in advance for addressing my issue.
 BMuthen posted on Tuesday, June 28, 2005 - 8:11 am
Mplus does not have a setup for generating specific skewnes and kurtosis. In the Muthen and Muthen Monte Carlo paper in SEM, we used a mixture approach to get non-normal data. You can see that paper. You can use such an approach and get the skewness and kurtosis you want by trial and error.
 CG posted on Monday, February 12, 2007 - 11:58 am
Hello,
I am generating data for a simulation study in MPLUS by using another program (SAS) to generate the replication datasets.
The first line of the datasets contains the variable names (e.g., x1 x2...x15)
and data begin on the second line.

Is there a way to tell MPLUS to 'skip' the first line when it reads in the datasets?
Thanks for your advice
 Linda K. Muthen posted on Monday, February 12, 2007 - 3:01 pm
No. You will need to delete the first line with the variable names.
 Christine DiStefano posted on Tuesday, February 13, 2007 - 8:01 am
Deleting the variable names from each replication isn't an option -there are too many replications.

I should be able to move to the MPLUS framework: I'm interested in simulating data that is underlying normally distributed but categorized and follows different distributional characteristics (e.g., uniform, normal, etc.). However, in the examples, I don't see an example to generate categorical data.

How can the thresholds be specified to achieve the different observed distributional characteristics? In LISREL,
Z-values are used to create the thresholds - is it the same in MPLUS?
 Linda K. Muthen posted on Tuesday, February 13, 2007 - 8:37 am
If deleting the names is not an option, perhaps SAS has an option so that they do not put the names on the first record. Mplus will stop if it finds character data as the first record.

Examples 11.3, 11.8, and 11.9 generate categorical data. Also, any example that analyzes categorical data has a Monte Carlo counterpart where you can see how the data were generated. The Monte Carlo counterpart of Example 5.10 shows how categorical factor indicators are generated when thresholds are included in the model.
 finnigan posted on Monday, September 03, 2007 - 2:28 pm
Linda/Bengt

I'm trying to use a montecarlo simulation to generate ordinal data to asertain sample size for a CFA. The survey I'm using contains 50 items with a 5 point likert scale which results in a five factor model. As far as I understand population values are required for each indicator. Do these values refer to the factor loadings. Example
Esteem By x1*.62 x3*.55.

Prior research using this survey assumed that the data was continuous and not ordinal. Do you know what approaches are taken if one does not know the poulation parametre values for ordinal data?

thanks
 Linda K. Muthen posted on Monday, September 03, 2007 - 3:15 pm
Yes, those would be the population values used for the factor loadings.

If you have data, you can analyze it and use the parameter estimates as population values. This is shown in Example 11.7.
 finnigan posted on Tuesday, September 04, 2007 - 3:09 am
Thanks Linda,

I do not have data yet. I will be using factor loadings from a previous study to generate the MPLUS output. If previous studies found no covariance between the factors then do I use zero in the with statement between factors. eg f2 with f1*0 or just insert the insignificant value taken from published research?

I am using a longitudinal approach. Does this need to be considered in the MPLUS code?
Thanks
 Linda K. Muthen posted on Tuesday, September 04, 2007 - 8:48 am
I would use the small value.

Yes. See the Monte Carlo counterpart inputs that come with Mplus. Growth models are found in Chapter 6.
 finnigan posted on Wednesday, September 05, 2007 - 4:13 pm
Linda

Are there any concerns that arise from using loadings from PCA in a CFA montecarlo? I noticed from published research that some of the x's load on different factors. For the purposes of the montecarlo analysis is it appropriate to select the highest factor loading? In the case of say x1=.62 on one factor but x1= -.64 on another factor. In this case which factor loading is selected for the value of x in the montecarlo model.
 Linda K. Muthen posted on Tuesday, September 18, 2007 - 4:45 am
A CFA Monte Carlo should not generate data using parameter values from a PCA. PCA assumes a model where the residual variances of the factor indicators are zero. CFA estiamtes residual variances of the factor indicators. PCA can be seen as an estimator for CFA but it is a biased estimator.
 Eric Teman posted on Friday, May 25, 2012 - 1:36 pm
Is there a way for non-positive definite results to be flagged in the .dat results files in Monte Carlo studies?
 Eric Teman posted on Friday, May 25, 2012 - 2:34 pm
If there's not a way to eliminate non-positive definite results from Monte Carlo replications, how should these be dealt with? It is unfeasible to open each .out file to investigate cases of non-positive definiteness prior to analyzing results from a Monte Carlo study.
 Linda K. Muthen posted on Friday, May 25, 2012 - 3:54 pm
If you ask for TECH9 on the OUTPUT command, you will see the error messages for each replication.
 Fraser Bocell posted on Tuesday, November 11, 2014 - 6:50 pm
I have a question about how correlated error terms among indicators in a CFA are handled in the Monte Carlo command.

If I specify x1 WITH x2*.3 in the Model Population, is the .3 a correlation (r) or a percentage of variance shared (r-squared). My results seems to indicate the latter. But I can't seem to find anything definitive in the documentation.

Thank you.
 Linda K. Muthen posted on Wednesday, November 12, 2014 - 11:28 am
It is a covariance or residual covariance depending on whether the variables are exogenous or endogenous.
 Ahmed Khalil Ben Ayed posted on Wednesday, June 10, 2015 - 6:21 am
Hi Professor Muthen,

I used Prelis to generate simulated data (500 repetitions) in one text file (free format).

Is there a way to run a Monte Carlo analysis on Mplus using this same file ?

Many thanks.
 Linda K. Muthen posted on Wednesday, June 10, 2015 - 1:28 pm
No. Each data set must be in a separate file.
 Karen Traxler posted on Wednesday, January 04, 2017 - 3:15 pm
Hello, I viewed your topics 1 through 8 to learn about using mplus for my dissertation and I want to thank you for making those videos available as they were very helpful. I now have questions specific to my dissertation topic and will be as brief as possible.
I would like to use mplus to conduct a monte carlo simulation study by generating multivariate categorical data (both normal and non-normal distributions) in a two-level model (specifically MCFA) with random intercepts. I plan to hold the number of items, and the number of categorical response choices fixed, fix Cronbach's alpha reliability to .7 and the ICC to .20. I will vary the number of individuals per group and the number of groups in a crossed design to assess any bias in reliability estimates (Cronbach alpha and polychoric ordinal alpha) and I have not been at all successful in piecing the syntax together to accomplish this. I have the code from Geldhof et al but they use continuous data. Any suggestions for further reading or assistance with coding would be realty appreciated.
Thank you in advance for your time.
Sincerely,
Karen: University of Northern Colorado
 Linda K. Muthen posted on Wednesday, January 04, 2017 - 3:52 pm
Each of the examples in the Mplus User's Guide comes with a Monte Carlo counterpart which is used to generate the data for the example. Find a model in the user's guide that is similar to what you want and use that Monte Carlo counterpart as a starting place.
 Amanda Lemmon posted on Monday, October 19, 2020 - 10:03 am
Hi -

I copied the syntax for Monte Carlo CFA with non-normal continuous variables (no missing data) from http://www.statmodel.com/bmuthen/articles/Article_096.pdf. However, I get an error message saying:

*** ERROR in MONTECARLO command
Unknown option:
NCLASSES

Do I need to put something else instead of NCLASSES? Or maybe there is an easier method for generating such data, as this paper is a little bit old?

Thank you!


TITLE: cfa3.inp non-normal, no missing
(full syntax on pp. 14-15)
 Bengt O. Muthen posted on Monday, October 19, 2020 - 10:20 am
Instead, look at the Chapter 7 MonteCarlo examples on our website.
 Amanda Lemmon posted on Tuesday, October 20, 2020 - 1:40 pm
Thank you! I have been studying the 7.26 example and the associated Monte Carlo code. The code has the following line: [c#1*-2.5 c#2*-1.5]; The output says that these are means of categorical latent variables. How are these numbers interpreted? I am not sure what means of categorical latent variables represent in this context...

Thanks again!
 Bengt O. Muthen posted on Wednesday, October 21, 2020 - 11:30 am
Have a look at the UG chapter 14 example on pp 555-556.
 Amanda Lemmon posted on Friday, October 23, 2020 - 8:58 am
Thank you! If I understood correctly, these means of c's are log odds, which can be transformed into probabilities of being in a particular latent class. Can these probabilities be interpreted as true proportions of cases in each class?
 Bengt O. Muthen posted on Friday, October 23, 2020 - 3:59 pm
Yes.
 Amanda Lemmon posted on Tuesday, October 27, 2020 - 4:35 pm
Thank you! I am wondering if there is a way to find out which log odds I need to specify in order to get particular skewness, or is the only way through guess and check?

Also, does the number of latent classes matter for the purposes of generating a non-normal distribution? E.g., is 3 enough, or should I specify more latent classes?

Thanks again!
 Bengt O. Muthen posted on Wednesday, October 28, 2020 - 4:12 pm
Q1: Perhaps you are referring to the class probabilities. They can be determined via the logits as described in Chapter 14 of the UG.

Q2: It's up to you; 3 is fine but with more classes you get a smoother non-normal.
 Amanda Lemmon posted on Thursday, October 29, 2020 - 10:31 am
Thank you! For Q1, I was thinking about the link between log odds (or class probabilities) and skewness. For example, if I want to generate data that have skewness = 1, how do I know which log odds (or class probabilities) to specify in the Monte Carlo model? I understand that I can try specifying different log odds and then seeing what skewness it produces, and then adjusting log odds until the desired skewness is obtained. But I was wondering if there is a more efficient way to find out which log odds I need to specify to get the desired skewness?
 Amanda Lemmon posted on Thursday, October 29, 2020 - 12:53 pm
To correct my previous post: I meant to say -- specifying log odds (class probabilities) AND FACTOR MEANS in order to get data with a particular skewness, as both log odds and factor means are needed. (I am using Monte Carlo Ex. 7.26).
 Bengt O. Muthen posted on Saturday, October 31, 2020 - 1:35 pm
There probably is a formula for that but I don't have one handy. I'd do trial and error with a very large sample over many replications.
 Amanda Lemmon posted on Monday, November 02, 2020 - 1:16 pm
Got it -- thank you!
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: