You are here

Multivariate AE model

5 posts / 0 new
Last post
MG's picture
MG
Offline
Joined: 10/29/2010 - 09:21
Multivariate AE model

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

multAEModel 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

Ryne's picture
Offline
Joined: 07/31/2009 - 15:12
It's hard to tell without the

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?

MG's picture
MG
Offline
Joined: 10/29/2010 - 09:21
HI Ryne, here there is the

HI Ryne,
here there is the script I am using.
Thanks a lot,
Maria

Ryne's picture
Offline
Joined: 07/31/2009 - 15:12
It looks like you used the

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.

MG's picture
MG
Offline
Joined: 10/29/2010 - 09:21
Hi Ryne, that worked

Hi Ryne, that worked beautifully!
Thanks for explaining, this makes sense.
Thanks again, Maria

Log in or register to post comments