error message in trying to fit a var/covar matrix

1 reply [Last post]
mkeller's picture
Offline
Joined: 08/04/2009

Hi all,

I appreciate the speedy help that comes with posting on the forums here.

I have two separate problems so thought I'd post them both here:

PROBLEM 1: I'm trying to fit a model using var/cov matrices rather than raw data, as suggested by Steve in an earlier post (in order to get rough ideas of good start values for later FIML fitting). However, I get the following error message (pasted before it is the last bit of the script so you can see how I set up the Objective functions

+ ),
+ mxModel("DZOS",
+ mxData( observed=dzmfcov, type="cov" ,means=dzmfmeans , numObs=nrow(dzosData)),
+ # mxFIMLObjective( covariance="NTF.expCovDZOS", means="NTF.expMeanMF", dimnames=selVars )
+ mxMLObjective( covariance="NTF.expCovDZF", means="NTF.expMeanF", dimnames=selVars )
+
+ ),
+ mxAlgebra( expression=MZM.objective + MZF.objective + DZM.objective + DZF.objective + DZOS.objective, name="neg2sumLL" ),
+ mxAlgebraObjective("neg2sumLL")
+ )

> system.time(multiHetNTFFit <- mxRun(multiHetNTFModel))
Running multiHetNTF
Error in mxRun(multiHetNTFModel) :
Could not initialize objective function MxMLObjective. Error: No error code reported.

PROBLEM 2: Not being able to make headway on the above error, I went back to the FIML approach, but I'm getting non-positive def matrices:

> system.time(multiHetNTFFit <- mxRun(multiHetNTFModel))
Running multiHetNTF
Error: The job for model 'multiHetNTF' exited abnormally with the error message: Expected covariance matrix is not positive-definite in row 230.

I've looked over the expected cov matrices and cannot see where the problem is. I've tried changing start values but to no avail. Is the "row 230" a helpful hint at all? If so, how does one interpret this?

THANKS AGAIN!

matt

tbrick's picture
Offline
Joined: 07/31/2009
Hi, Matt. The "Could not

Hi, Matt.

The "Could not initialize" is an error message I put into the code for when something unexpected breaks, but this is the first time I've seen it. It is likely due to a bug in the OpenMx code. If nothing else, it's something that we should be detecting to provide a better error message.

If you wouldn't mind posting your script and (if possible) either a chunk of your actual data or some simulated data that gets the same error, we'll take a look at it and try to diagnose/fix the problem.

The "row 230" refers to row 230 of the supplied data for that FIML Objective. It's intended to give you the option of looking at that specific data element to see if there's something odd about the definition variables in that data row. Generally it's better to mess with starting values first, but sometimes an improper definition variable can cause this error as well.

I'll make a change to the error message there so that it's a little more clear what's happening.

It's worth noting, in case this fixes something, that your MLObjective and your commented-out FIMLObjective in model "DZOS" are not operating on the same expected covariance and means algebras. If that's not intentional, it might be responsible for some of the errors.

Cheers.