Per some recent dialog with Greg Carey, I suggest that we alter the OpenMx Hessian estimation by default. Rather than use the estimates from NPSOL to compute the standard errors, we should use the numDeriv package.
The attached R script, when run, shows that NPSOL's Hessian* is incorrect when the model is underidentified (more free parameters than statistics). As a result a user could be misled into thinking that a model is identified when it is not. A better picture emerges when numDeriv is used.
Exactly how to implement/integrate numDeriv() is not clear to me. The example sets up the fit function directly in R code; we would want to use the built-in code for this purpose, so as to take advantage of computational efficiency. Basically, one supplies the function to evaluate, and a vector of parameter estimates at which the Hessian is required.
I'm not sure that it will work with constraints, that should be investigated.
*The Hessian is the matrix of second partial derivatives of the fit function with respect to the parameters, and is the inverse of the covariance matrix of the parameters.