Multivariate AE model

Posted on
No user picture. MG Joined: 10/29/2010

HI,
I am using this script to run a multivariate-Cholesky AE model

multAEModel <- mxModel(choleskyACEFit, name="multAE",
mxModel(choleskyACEFit$ACE,
mxMatrix( type="Lower", nrow=nv, ncol=nv, free=F, values=0, name="c" ),
mxCI(c("ACE.sta","ACE.stc","ACE.ste")))
)

This is the error message I get:

Error: The following error occurred while evaluating the subexpression 'solve(sqrt(AE.I * AE.C))' during the evaluation of 'AE.Rc' in model 'univAE' : Lapack routine dgesv: system is exactly singular

I changed starting values without success. I get the same error if I drop only some the c paths.
Sorry to trouble with a silly question...
Thank you, Maria

Replied on Sun, 09/02/2012 - 23:20
Picture of user. Ryne Joined: 07/31/2009

It's hard to tell without the full script, but I'll take a few guesses. The "singular" error relates to the fact that AC.I*AE*C is non-invertible. If you've reduced the paths in c without reducing the dimension of c, you might not solve the error. Can you provide the full code?

Replied on Tue, 09/04/2012 - 12:16
Picture of user. Ryne Joined: 07/31/2009

In reply to by MG

It looks like you used the ACE model to make the AE, which indirectly lead to your problem. To turn the ACE into the AE model, you zero-ed out the c matrix. However, you also left the Rc algebra in. This means that C is zero, I*C is also zero, and inverting a zero matrix can't be done (as there is no way to define x such that x*0=1). Either remove the Rc algebra and all references to is or just replace the Rc algebra with something like this (as Rc isn't referenced after its calculated):

mxAlgebra(c, name="Rc")

and you should be good to go.