Attachment  Size 

Sample script  3.09 KB 
Sample data  59.05 KB 
As a step to building a larger SEM, I am currently trying to fit a MIMIC CFA with ordinal indicators.
As demonstrated in the sample script and dataset, the model (using ML) with continuous variables the model is identified and no error is thrown.
If I recode variables as ordinal, and add thresholds to the model I get the error messages differing based on fit function.
 Continuous models provides estimate sizes within a range that what would seem reasonable, the model is locally identified, and no error messages are returned.

An equivalent ordinal model, with with added thresholds, fit with ML, returns the error: "
Information matrix is not positive definite (not at a candidate optimum).
" Fit function is locally identified (
Be suspicious of these results. At minimum, do not trust the standard errors.mxCheckIdentification()
), but the estimates are unresonable. 
An equivalent model fit with WLS, returns the same error as fitting the ordinal model with WLS. Only now I also the following error from
mxCheckIdentification()
andmxStandardizeRAMPaths
: "Error in solve.default(I  A) :
"
system is computationally singular: reciprocal condition number = 1.92319e31
I am trying to understand what these error messages mean, and why they occur with ordinal variables and not with continuous data? Is there a way avoid this from happening? For example, does the data lack sufficient power to handle adding thresholds?
Supplementary information:
The larger SEM I'm trying to model, this factor is the main predictor. Since it has multiple factors with ordinal indicators, WLS is realistically the only way I can fit the larger model. The SEM model keep throwing error messages, and estimates that are both disproportionate and inconsistent when I try fit the data with this factor and its ordinal indicators. The problem seem to be with this particular factor (see attached script and dataset), as the same errors are thrown when I run it as a CFA. Also, the SEM will not throw an error if this factor and indicators are either removed or its indicators are added as continuous.
Thank you for the full script! It really helps to see what is going on.
If I understand the intended model correctly, then you have x1, x2, and x5 as predictors of a latent factor L1. L1 has indicators x3 and x4.
The script does not run as is. First, you need to
load('df_cont')
, notreadRDS
. Second, it's missingman_var
. I assumed you intended to have residual variances on the manifest variables, and added these paths. Third, all of the residual means were fixed to 1. For the continuous variable model, this causes terrible misfit which leads to many problems. Fourth, the starting values were not particularly reasonable, so I modified them. Fifth, it's not clear to me how you intend to identify the ordinal variables. Some strategies for the ordinal variables might not work for the binary ones. Sixth, for speed, I'd recommend trying the WLS ordinal model before the ML ordinal model. Seventh, you might want to consider x1, x2, and x5 as "exogenous" predictors with thedata.
style syntax instead of assuming any distribution for them. You could dummy code them if you think they are not really continuous. Eighth, I don't know what a "standardized" (e.g., via standardize RAM paths) MIMIC model implies about the regression effects going into the latent factors. Ninth, I wouldn't call the regression weights for the variables that predict the latent factor "loadings". It's confusing to call them that in the comments.I've attached a revised script that fixes some of these problems, but not all of them. Does that take you a step closer to a solution?
Thanks for your detailed reply. Your revisions definitely helped. The errors thrown in my initial model is now gone.
Regarding your first and second points, thanks for pointing out the code errors and lack of specification. These were mainly caused when trying to extract my relevant code to something presentable here.
readRDS
toload
.I still have some questions related to your subsequent points, however. I have listed comments and questions corresponding to your numbering:
man_var
was unintentionally dropped from the sample script I sent) according to the example on ordinal model specification in the documentation. By fixing the means and residual variances to 0 and 1, respectively, the intention was to coerce the latent continuous variables underlying the observed ordinal variables to similar scale for easier comparison. Am I making the correct assumptions here? (The continuous model was only intended as a intermediary step to see if it could help model fit, but I can see that fixing the means would be problematic in this case.) As an alternative to fixing the means, I noticed you fixed one threshold per variable instead. I presume this is necessary for identification, but how does that affect threshold estimation? This leads me to your fourth point;mxAutoStart
to help find better starting values. Could you recommend some good practices / rulesofthumb for setting reasonable starting values?mxAutoStart
does?data.
style syntax. Could you refer a tutorial, provide an example, or similar?Hi
For #4, starting values, I usually try to set them up so that i) expected means are about right; ii) expected variances are about right, maybe a bit bigger than sample variances; and iii) expected covariances are close to zero. The last of these is unlikely to be close to the observed covariances, but I still like this set of starting values. For one, it is unlikely that an extreme outlier is found.. Two, the expected covariance matrix is near diagonal, and thus strongly positive definite... Optimization gets into difficulties when the expected covariance matrix isn't positive definite. With zero covariances between variables, the likelihood is simply the product of the univariate likelihoods, which will normally be greater than zero and a good place for optimization to begin. Openmx has helper functions for this sort of thing, to inspect expected covariances/means you can use omxGetExpected(model, "covariance") for example, and eigen(omxGetExpected(model, "covariance")).