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

By *carey*

Created *01/21/2010 - 11:38*

Thu, 01/21/2010 - 11:38 — carey [1]

Suggestion: Add an option to mxPath to accept an MxMatrix object.

E.g.,

VApsn <- mxMatrix(name="VApsn", type="Symm", nrow=5, ncol=5, free=TRUE)

hVApsn <- mxAlgebra(.5 %x% VApsn, name="hVApsn")

mxPath(from=AMZ1, to=AMZ2, arrows=2, matrix=VApsn)

mxPath(from=ADZ1, to=ADZ2, arrows=2, matrix=hVApsn)

Rationale: Imagine a BG twin model with 5 personality traits and 5 types of psychopathology and a complicated causal path model among the phenotypes. With the current OpenMx, the easiest way to code this is through the matrix approach, but working out the algebra and implementing it is error prone. An MxPath approach eliminates algebraic error, but is a real pain in the gazuggie to code, is very susceptible to error, and virtually impossible to grasp by examining the MxPath object. Allowing an MxMatrix object (easy to inspect) to interface with an MxPath object greatly reduces the probability of error and makes it much easier for the user.

greg

**Links:**

[1] http://openmx.psyc.virginia.edu/users/carey

[2] http://openmx.psyc.virginia.edu/thread/414

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

[4] http://openmx.psyc.virginia.edu/forums/opensem-forums/suggestion-box