CFA with categorical variables

Posted on
Picture of user. Mike Cheung Joined: 10/08/2009
Hi all,

I am fitting some CFA models with all categorical variables with FIML. The information matrix is often not positive definite when the number of variables is larger than 4 or above. Attached are some examples.

Any suggestions to improve its stability? Thanks in advance.

Best,
Mike

Replied on Sat, 04/27/2019 - 18:13
Picture of user. AdminRobK Joined: 01/24/2014

Hi, Mike. You can increase the numerical accuracy of the multivariate-normal integration algorithm via mxOption(), albeit at the cost of longer running time. Specifically, if you decrease 'mvnRelEps', you'll be reducing the amount of numerical error that the algorithm will tolerate in an acceptable solution (the integration algorithm estimates an upper bound on how much numerical error is in the probability value it returns). There are also the 'mvnMaxPoints*' options, which are explained in the man page for mxOption(), and also in this Github comment from Mike Neale; you can improve the accuracy of the algorithm by increasing the number of integration points.

I can see that you're already using `mxTryHardOrdinal()`, which will help in finding the MLE in spite of the noisy derivatives. You might want to try a derivative-free optimizer.

Unfortunately, non-PD information matrices seem to sometimes be unavoidable with threshold variables. The issue is exacerbated if any of the categories has low frequency.

Edit: another alternative is to analyze your variables using OpenMx's Item Factor Analysis module.