You are here

"Observed" correlation matrix with missing data--is it computed?

7 posts / 0 new
Last post
fife's picture
Offline
Joined: 07/01/2010 - 03:02
"Observed" correlation matrix with missing data--is it computed?

I've got a bit of an unusual question. I have missing data and I'm taking advantage of FIML's algorithms to handle that missingness. I know the EM algorithm will return a "corrected" correlation or covariance matrix. Will FIML do the same? I know it returns corrected model estimates, but I can't see how I'd extract the corrected correlation matrix. When I type:

model$data

It returns the raw dataset (with missing values still missing).

Any ideas?

mhunter's picture
Offline
Joined: 07/31/2009 - 15:26
Saturated Expected Cov

FIML is a raw data method. It does not create a covariance matrix from the raw data at any point. It estimates an expected covariance matrix that can be accessed in several ways. One way is as follows:

yourModelFit <- mxRun(yourModel)
yourModelFit$fitfunction$info$expCov

This gives you the model-implied expected covariance matrix. Perhaps the closest thing to what you're after is the expected covariance matrix for a raw data saturated model. In OpenMx 2.0 and the Beta you can get saturated and independence models like this:

yourRefModels <- mxRefModels(yourModelFit, run=TRUE)
#yourRefModels is a list with two elements.  The first one is the saturated model.
yourRefModels[[1]]$fitfunction$info$expCov

That would give you the saturated model expected covariance matrix as fit by FIML. This is the absolutely best fitting covariance matrix that takes into account the missing data via FIML.

Hope this helps!

fife's picture
Offline
Joined: 07/01/2010 - 03:02
Excellent response. One quick

Excellent response. One quick question about that--would that saturated covariance matrix be equivalent to what I'd obtain using the EM?

mhunter's picture
Offline
Joined: 07/31/2009 - 15:26
Probably

Given the simulations I know you've done regarding missing data, EM, and FIML, I believe that the saturated FIML expected covariance matrix would be very close to the EM 'corrected' covariance matrix. I'm not sure, but that's how I'd bet.

fife's picture
Offline
Joined: 07/01/2010 - 03:02
I suppose I should actually

I suppose I should actually just compute it and find out!

Thanks for the input.

fife's picture
Offline
Joined: 07/01/2010 - 03:02
Not working

I'm finally getting around to testing this out. It tells me that the function mxRefModels doesn't exist. I'm running OpenMx_2.0.0-3838. Any ideas?

jpritikin's picture
Offline
Joined: 05/24/2012 - 00:35
mxRefModels

It should be there,

http://openmx.psyc.virginia.edu/docs/OpenMx/2.0.0-3838/_static/Rdoc/omxSaturatedModel.html

The help may not be linked correctly so ?mxRefModels might fail.