Published on *OpenMx* (http://openmx.psyc.virginia.edu)

By *neale*

Created *12/08/2009 - 11:03*

Tue, 12/08/2009 - 11:03 — neale [1]

### Jump to:

Project: | OpenMx |

Component: | Code |

Category: | feature request |

Priority: | normal |

Assigned: | Unassigned |

Status: | active |

Description

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.

Attachment | Size |
---|---|

omxTest2.R [3] | 2.34 KB |

**Links:**

[1] http://openmx.psyc.virginia.edu/users/neale

[2] http://openmx.psyc.virginia.edu/issue/2009/12/alternative-estimate-hessian#comment-1057

[3] http://openmx.psyc.virginia.edu/sites/default/files/issues/omxTest2.R