Error: [...] fit is not finite

Posted on
Picture of user. Arthur Joined: 02/13/2020
Dear OpenMx experts/users,

I am using an ACE univariate script with AE, CE and E nested models. I think that the script itself is good and makes sense, however, using a relatively small dataset (40 MZ pairs; 25 DZ pairs) (this is fMRI data), I get the following error message:

> # Run CE model
> CEmodel <- mxModel( ACEFit, name="CEmodel" )
> CEmodel <- omxSetParameters( CEmodel, labels="A11", free=F, values=0 )
> CEfit <- mxRun( CEmodel, intervals=T )
Running CEmodel with 7 parameters
Error: The job for model 'CEmodel' exited abnormally with the error message: fit is not finite (The continuous part of the model implied covariance (loc2) is not positive definite in data 'DZ.data' row 11. Detail:
covariance = matrix(c( # 2x2
-0.333084, -0.829576
, -0.829576, -0.333084), byrow=TRUE, nrow=2, ncol=2)
)
In addition: Warning message:
In model 'CEmodel' Optimizer returned a non-zero status code 10. Starting values are not feasible. Consider mxTryHard()

> mxTryHard(CEmodel)
All fit attempts resulted in errors - check starting values or model specification

I also tried to change the starting values but it seems not to fix the issue. Looking at the OpenMx forum, I found somebody who had the same issue ( https://openmx.ssri.psu.edu/node/4398 ), although the answer doesn't help much in my situation.

Would someone be able to indicate where the problem could come from and how to solve it?

I attached to this message the ACE script in R and txt formats.

Any help would be immensely appreciated!

Many thanks,
Arthur

Replied on Fri, 02/21/2020 - 11:03
Picture of user. AdminRobK Joined: 01/24/2014

In your ACE model, it looks as though either 'C11' or 'E11' (probably the latter) is being estimated as negative. Then, when you fix 'A11' to zero, the model-expected variance is also negative, and is too negative to be perturbed back above zero by `mxTryHard()`. First, put a lower bound on 'E11', like this:

compE <- mxMatrix( type="Lower", nrow=1, ncol=1, free=TRUE, lbound=1e-4,
labels="E11", values=5, name="VE" )

Then, instead of this (line 257),

CEmodel <- mxModel( ACEFit, name="CEmodel" )

, try doing this instead,

CEmodel <- mxModel( ModelACE, name="CEmodel" )

.