First: Your Text*** ERROR in Montecarlo command Unknown option: GCLASSES
I stopped that error by changing gclasses to genclasses, but I'm not positive that's correct.
But then I get:
*** ERROR in Montecarlo command Unknown option: NCLASSES.
And I wasn't sure how to correct that one.
I'm using Mplus v3.11.
P.S. I've left the manual at home, and was trying to respond to this message, on a mailing list with a Monte Carlo simulation. Although if anyone thinks I'm wrong (or right) they could post to the list. (I think you have to join it, at www.jiscmail.ac.uk, but it's not got a lot of traffic.
GCLASSES has been changed to GENCLASSES. And NCLASSES has been changed to CLASSES in Version 3. If you are away from your user's guide in the future, the last chapter which summarizes all of the Mplus language can be found at www.statmodel.com under the Demo.
One more thing. The Mplus Version 3 CD comes with all of the examples from the Mplus User's Guide plus Monte Carlo counterparts of most of these examples. These are a good place to start if you want to do a Monte Carlo study.
When conducting a monte carlo run such as the example 11.5 in the manual is there any way to obtain the population covariance matrix.
BMuthen posted on Saturday, November 12, 2005 - 5:43 pm
This is not part of the output in a Monte Carlo analysis. You would use the MODEL POPULATION model from your Monte Carlo analysis in the MODEL command of a regular analysis with all parameters fixed to the population values. Use as data in this regular analysis a matrix of means zero, variances one, and covariances zero. Ask for RESIDUAL in the OUTPUT command. The estimated matrix you obtain is the population covariance matrix.
I am interested in running a CFA model simulation in MPLUS. I have two questions: 1) I have external datafiles (like example 11.6) that I wish to read. While I've saved the data files as separate files, I can't get MPLUS to read in the successive datasets. Here is an example, where the files are named MPLUS.rep1.dat, MPLUS.rep2.dat (following example 11.6) TITLE: try1 data: FILE IS MPLUS.replist.DAT; TYPE IS MONTECARLO; VARIABLE: NAMES ARE Y1-Y10; MODEL: F1 BY Y1-Y5; F2 BY Y6-Y10;
2) If the save data command is used, are the parameters that are saved standardized or unstandardized? If unstandardized, how can they be converted to standardized parameters?
If you want to standardize the saved raw parameter estimates, you need to find the appropriate variances, turn them into standard deviations, and apply the proper formulas to each estimate.
Gareth posted on Thursday, February 07, 2008 - 3:50 am
In the example for a growth model (normal, no missing data, with covariate) monte carlo study to determine sample size, could you tell me how [x@0]; x@1; corresponds to a mean of 0.5 and a variance of 0.25 for the dichotomous covariate?
If square brackets indicate means and x@1 indicates variance I'm not sure what I'm missing.
I would like to compare factor score estimates for different models (i.e., IRT, ordinary FA with ML estimation, and FA with WLSMV for categorical data) by running a Monte Carlo simulation. For this, I need factor scores to be generated for every run of each model. Is it true that this cannot be done in Mplus (since the savedata=fscores option is not available for type=montecarlo)? And if so, could you suggest an alternative way of obtaining factor scores for each replication?
I am attempting to conduct a Monte Carlo study (using the external Monte Carlo procedure) in which I simulate data for two groups, each of which has a different underlying factor model (e.g., there are group-based differences in factor loadings). Subsequent to this I hope to analyze the data ignoring group membership. In step 1 of the procedure, the population values (e.g., of the factor loadings) in the output are consistent with what I've specified in my population model. However, the average estimates seem to be higher than what I would have anticipated, and I am concerned that this suggests I've made an error. On the other hand, this may be due to the fact that I have fixed an invariant factor loading to 1 in each of the groups in the subsequent model statement (i.e,. the model statement that follows the population model statement.) Should the average estimates in each group approximate the values specified in the population model, or is it likely that the discrepancies I'm concerned about are due to my identification constraint in the subsequent model statement? Thank you very much for your assistance with this!
Try using 10 replications and 10,000 observations. If the average values do not match the population values, then you are most likely doing something wrong. If you are fixing the first factor loading to one now but generated the data with all factor loadings free and the factor variance fixed to one, this may be an issue.
Thank you for your response. I tried what you suggested and had similar results. To clarify, my goal is to generate data for two groups, each with specified population values for factor loadings, residual variances, and factor means and variances. Subsequent to this I will analyze the data generated in step 1 (using type = montecarlo and the list.dat file created in the first step.) Since posting my question I found the following response to a question on another thread:
"Example 11.6 shows how to save data for a subsequent external Monte Carlo. You don't need the MODEL command if you are only saving the data. You do need the ANALYSIS command. Nothing in the MODEL command affects data generation."
If my goal is to generate data in the first step that will be saved and used in subsequent analyses, it sounds from this like I may not need to be concerned with the model statement in the first step that seems to be giving rise to the odd average parameter estimates? The average parameter values for the residual variances are consistent with the population values. The factor loadings are not, and the values of the factor loadings change depending upon which item I fix to 1. Furthermore, if I omit the model statement, my output does not include information on the population values of the parameters I specified in the population model statement -- I only get information on the item variances.
Iím new to Monte Carlo simulations so any advice you could offer is greatly appreciated. Iíve performed a CFA of a 48-item questionnaire (correlated four-factor model) with 345 participants (CFI = .48, TLI = .45, SRMR = .09, RMSEA = .090, 90% CI = .087 to .093). Iíve subsequently revealed similar findings of inadequate model fit using ESEM.
Another reviewer has requested that I provide some justification for adequacy of the sample, referring me to the following paper:
Myers, Ahn, and Ying (2011)
Iíve also read Muthťn and Muthťnís (2002) paper. Iím interested in estimating the amount of power I will have with my fixed sample size of 345 participants. Thus, I was hoping you might be able to shed light on the following questions:
1. As there are no previous factor analytical studies of this measure, despite being employed in over 15 published studies now, is it justifiable for me to use the parameters from my CFA analysis as input for the population parameter estimates? My concern in this regard relates to the large degree of model misfit.
2. If using the parameters from my CFA model is not recommended, how else could I go about creating values for the population estimates with no other empirical data? Or is there some other method(s) that I could explore for estimating power post hoc?
I question whether your data support four factors if the ESEM does not fit. You should do an EFA with these data to see how many factors are actually represented. If you are not using MLR, I would suggest that.
Stephen Cox posted on Sunday, February 03, 2013 - 3:24 pm
Hi there - I am trying to install the runall utility so as to read in externally generated files for analysis. I have a 64-bit windows system, with which the runall utility appears incompatible.
Is this correct? Is there a version for the 64-bit version of Mplus?
You should instead use external Monte Carlo. See Step 2 of Example 12.6. This has replaced RUNALL.
Stephen Cox posted on Wednesday, February 06, 2013 - 4:50 pm
Thanks - I have made good progress.
I am having trouble getting my population defined correctly. Below is a simplified 2 factor CFA model I am testing using external monte carlo.
My problem is with defining the population covariance of the two latents (called global and study). The model runs if I do not include a population value, or leave the covariance statement out, but then sets the population value at 0 (thus the model does not fit).
If I include a population value, as shown below, the model does not converge (it says I have no free paramters).
What am I doing wrong?
Data: file = resamplereplist.dat; type = montecarlo;
global by ycopia8@1; global by ycopia9*1.22 (p2); global by ycopia10*1.054 (p3); global by ycopia11*-.546 (p4); study by ycopia15@1 (p5); study by ycopia16*1.261 (p6); study by ycopia17*1.216 (p7); study by ycopia18*.654 (p8); study with global*.514;