You are here

R forced closed due to non pd cov matrix

2 posts / 0 new
Last post
wuhao_osu's picture
Offline
Joined: 09/07/2010 - 17:14
R forced closed due to non pd cov matrix

Code as below. I think it is due to a non positive definite covariance input. When this is fixed, all is fine.

A pop -up says R for windows GUI front end has stopped working.

require(OpenMx)

varnames dataMZ dataDZ[1,2]

p pstar diagind

nMZ nDZ varnames

LA label=paste("a",1:pstar,sep=""),name="LA");
LC label=paste("c",1:pstar,sep=""),name="LC");
LE label=paste("e",1:pstar,sep=""),name="LE");

LA@lbound[diagind] LC@lbound[diagind] LE@lbound[diagind]

A C E

ACESigmaMZ name="ACESigmaMZ");
ACESigmaDZ name="ACESigmaDZ");

ACEModelMZ mxMLObjective(covariance="ACEModelTwin.ACESigmaMZ",dimnames=varnames),
mxData(observed=dataMZ,type="cov",numObs=nMZ));
ACEModelDZ mxMLObjective(covariance="ACEModelTwin.ACESigmaDZ",dimnames=varnames),
mxData(observed=dataDZ,type="cov",numObs=nDZ));
twin ACEModelTwin ACESigmaMZ,ACESigmaDZ,ACEModelMZ,ACEModelDZ,twin,
mxAlgebraObjective("twin"));

mxRun(ACEModelTwin)

mspiegel's picture
Offline
Joined: 07/31/2009 - 15:24
This is a bug in the backend.

This is a bug in the backend. Your intuition is correct, it is caused by a non-positive-definite observed covariance matrix. However we definitely shouldn't be throwing a segmentation fault in these cases. We're working on a fix.

Log in or register to post comments