Attachment | Size |
---|---|
openmx_q.R | 1.04 KB |
Hi,
I am new to 2.0 and am playing around with specifying a non-standard fit function, and have hit some road bumps in trying to start with specifying the ML fit through mxFitFunctionAlgebra. Attached is the reproducible script. Error message is:
Error: The job for model 'One Factor' exited abnormally with the error message: MxComputeGradientDescent: fitfunction One Factor.fitfunction is not finite ()
If mxFitFunctionAlgebra() is used, does it have to include a gradient specification?
Thanks for your help.
Ross
mx version 4157,R 3.1.2, Mac OSX.
Gradient descent is the method of optimization used. The optimizer got into bad territory and then the fit function gave NaN. You don't have to provide a gradient. OpenMx computes it numerically.
To solve your issue, add a lower bound on the residual variances.
The variances are becoming negative in the course of optimization, likely because the starting values are not great. With just adding the lower bound, I get a complete optimization but it does give a warning (MxStatus RED). Changing the starting values or re-running the model from the solution solved that.