Parameter Variance/Covariance

5 replies [Last post]
IanCero's picture
Offline
Joined: 02/09/2012

In LISREL, it is possible to get a matrix of parameter variances and covariances. I need values from this matrix to compute some reliability estimates and am wondering if there is a way to get them from OpenMx. Is this matrix already computed? Is there a good way to access it? I'd appreciate any help!

Ryne's picture
Offline
Joined: 07/31/2009
The parameter

The parameter variance/covariance matrix is the inverse of the Hessian, or matrix of second derivatives of the likelihood function. We provide this matrix in the output under the name calculatedHessian. If your optimized model is named "results", then you can get the parameter covariance matrix like so:

solve(results@output$calculatedHessian)
 
To be clear, what you're doing is inverting the hessian, which is found in the output slot of 'results' under the heading 'calculatedHessian'.
 
ryne

Mike Cheung's picture
Offline
Joined: 10/08/2009
Just a quick check. Should it

Just a quick check.

Should it be 2*solve(results@output$calculatedHessian)?

Ryne's picture
Offline
Joined: 07/31/2009
You're right. Thanks, Mike!

You're right. Thanks, Mike!

Ian, listen to Mike Cheung. You'll either need to multiply the inverted Hessian by 2 or multiply the uninverted Hessian by 0.5.

IanCero's picture
Offline
Joined: 02/09/2012
Thanks

Got it, thanks for the help!

IanCero's picture
Offline
Joined: 02/09/2012
Thanks!

Thanks for the quick response. I'm really hoping to do everything for my thesis in OpenMx (go open source!) and, as far as I am aware, that was the last thing that I needed.

I wont have a chance to try this until I get home today, but I'm excited.