You are here

How to get the correlation residuals with the new version of OpenMx?

2 posts / 0 new
Last post
brauer's picture
Offline
Joined: 01/28/2012 - 11:34
How to get the correlation residuals with the new version of OpenMx?

Hi,

I recently downloaded the most recent version of OpenMx. Since then I am no longer able to get the model-implied covariance matrix, and therefore, the correlation residuals. Before, the following script would get me the correlation residuals:

residuals <- cov2cor(covmatrix) - cov2cor(modelfit$objective@expCov)
round(residuals, digits=4)

My data are in "covmatrix", a symmetric covariance matrix. The result of the mxRun is stored in "modelfit")

This script doesn't work anymore because modelfit$objective@expCov no longer gives me the model implied covariance matrix. What do I have to type instead?

brauer's picture
Offline
Joined: 01/28/2012 - 11:34
Never mind

Oops I just figured it out. All I had to do was add "info$". The following script works:

residuals <- cov2cor(covmatrix) - cov2cor(modelfit$objective@info$expCov)
round(residuals, digits=4)

Sorry!