You are here

mxConstraint error: reports Non-conformable subtraction, should own up :-)

Hi chaps,
I was incorporating mxConstraint() into a model today and getting the following error

mxRun(model)
Running common_path_constraint_ACE 
Error in mxRun(model) : Non-conformable matrices in Matrix Subtract.

The actual problem is that I was equating a 22 Identity to a 11 Full, so the error is misleading...

Would be nice if the error contained the matrix names (i.e., L and nFac_IMatrix) and mxConstraint rather than subtraction

Here's a fragment to show the usage...
share = mxModel("all",
mxMatrix("Full", nrow=1, ncol=1, free=TRUE, values=.6, name="a_l"),
mxMatrix("Full", nrow=1, ncol=1, free=TRUE, values=.6, name="c_l"),
mxMatrix("Full", nrow=1, ncol=1, free=TRUE, values=.6, name="e_l"),
mxAlgebra(a_l %% t(a_l) + c_l %% t(c_l) + e_l %*% t(e_l) , name="L"), # latent factor variance
mxMatrix("Iden", nrow=2, free=FALSE, name="nFac_IMatrix"),
mxConstraint("L", "=", "nFac_IMatrix", name = "constraint1")
)

Reporter: 
Created: 
Sat, 09/19/2009 - 16:53
Updated: 
Mon, 09/28/2009 - 22:39

Comments

Fixed in subversion trunk.