Error: [...] fit is not finite

Attachment | Size |
---|---|
UnivarACEcontTwins_Arthur.R | 12.04 KB |
UnivarACEconTwins_Arthur.txt | 11.93 KB |
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
negative variance
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" )
.
Log in or register to post comments
In reply to negative variance by AdminRobK
Error: [...] fit is not finite
Thank you so much for your reply. That seems to be the problem indeed, and your solution works perfectly!
Thanks again,
Arthur
Log in or register to post comments
In reply to Error: [...] fit is not finite by Arthur
Good to hear.
Log in or register to post comments