In OpenMx 1.2 we will be eliminating the
all = TRUE argument from the
mxPath() function. This argument will be replaced with a new argument to
mxPath() that will be more explicit about which paths are constructed and which paths are not constructed. You can follow the discussion of the new argument on the following forum thread.
In the meantime, you will want to be aware of certain behaviors of
all = TRUE that most users find unexpected. The
all = TRUE argument creates all pairs of pairs between the 'from' and 'to' fields. When bidirectional arrows are specified (
arrows = 2), then the path (a,b) is identical to the path (b,a). However, mxPath() generates both the (a,b) path and the (b,a) path, and overwrites the earlier path with the later path. This behavior is especially problematical if you want to assign distinct values, labels, free parameter designations, etc. to your paths.
Here is a concrete example. Suppose I want to create the following model.
I try creating it using the following R code:
lVars <- c('a', 'b') freeParams <- c('p1', 'p2', 'p3') model <- mxModel('model', type = 'RAM', latentVars = lVars, mxPath(from = lVars, to = lVars, arrows = 2, all = TRUE, labels = freeParams))
In order to get the desired paths, I would need to call:
model <- mxModel('model', type = 'RAM', latentVars = lVars, mxPath(from = lVars, to = lVars, arrows = 2, all = TRUE, labels = c('p1', 'p2', 'p2', 'p3'))