Imagine I want to create the following model:
I try creating this model fragment 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))
But this code generates the model:
What happened here? The explanation: When the mxPath() function is called with all = TRUE, it will generate n x m paths, where n is the length of 'from' argument and 'm' is the length of the 'to' argument. Keep in mind that when a path is created, it will clobber any existing path that has the same 'from', 'to', and number of arrows. In the case of symmetric paths, the 'from' and 'to' arguments can be switched with impunity. So the following paths are created:
This is a bug, right? The expected behavior when all = TRUE and arrows = 2 is not to clobber 1/2 of the generated paths. Does anyone have an example where the behavior shown here is the desired behavior?