Published on *OpenMx* (http://openmx.psyc.virginia.edu)

By *Mike Cheung*

Created *12/30/2009 - 01:24*

Wed, 12/30/2009 - 01:24 — Mike Cheung [1]

Hi, all.

Thanks for creating OpenMx, a wonderful R package!

According to the manual of version 0.2.3-1006, vech() is supported in mxAlgebra() via MCMCpack while vech() is not listed in http://openmx.psyc.virginia.edu/wiki/matrix-operators-and-functions [2] . I tried it in version 0.2.3-1006 but it failed. This also applied to other functions, such as diag(), c() and c(t()) (a ")" was missing in the manual).

Here are the example.

> library(OpenMx)

> library(MCMCpack)

> mxVersion()

[1] "0.2.3-1006"

> A <- mxMatrix("Symm", nrow = 3, ncol = 3, values=1:6, name = "A")

> B <- mxAlgebra(vech(A), name = "B")

> model <- mxModel("test", A, B)

> fit <- mxRun(model)

Running test

Error in substituteOperators(as.list(retval)) :

Could not find function with name vech and 1 arguments

By the way, would it also be possible to implement a similar function of vech() that does not include the diagonals? This function would be useful for analyzing correlation structure. Thanks.

Regards,

Mike

**Links:**

[1] http://openmx.psyc.virginia.edu/users/mike-cheung

[2] http://openmx.psyc.virginia.edu/wiki/matrix-operators-and-functions

[3] http://openmx.psyc.virginia.edu/thread/305

[4] http://openmx.psyc.virginia.edu/thread/296

[5] http://openmx.psyc.virginia.edu/forums/openmx-help/openmx-general-help