Path diagrams

Posted on
Picture of user. izahn Joined: 09/02/2009
One of the nice things about John Fox's sem package is that it can output path diagrams. I think this is a very nice feature, and would love to see it in OpenMx. Even better if it's implemented using grid or some other R graphics system instead of graphviz (as the sem package does). Graphviz works great once you get it installed and set up, but this can be difficult.
Replied on Thu, 10/15/2009 - 15:30
Picture of user. mspiegel Joined: 07/31/2009

Graphviz has a bug that causes SEM diagrams to look bad, but the problem doesn't seem to be high enough priority for regular graphviz users: http://www.graphviz.org/bugs/b1752.html
Replied on Thu, 10/15/2009 - 19:11
Picture of user. mspiegel Joined: 07/31/2009

In reply to by tbates

r932 in the subversion repository has a function with the signature

omxGraphviz(model, dotFilename = "")

The first argument must be a RAM model and the second argument is either a filename or "" to signify standard output. I think not relying on graphviz is a good idea, until we get enough users to request that the graphviz bug is fixed. I'm going to try to use the diagram package to make some pictures. omxGraphviz() exists in the 0.2.1 release, but it is has some bugs so don't use it. Also it will not write to standard output.

Replied on Fri, 10/16/2009 - 06:41
Picture of user. tbates Joined: 07/31/2009

In reply to by mspiegel

thanks mike,

Would be great if users could write a mapping file to allow non RAM models to output diagrams.

so
omxGraphviz(fit, mapping)

Would use mapping describe what cells in which matrices or algebras contained the latent, observed, paths (of each type) values.

I know it's very variable, but at least creating a plug-in architecture, so to speak, would allow people to solve the problem for their favorite model and (hopefully...) share it.

Replied on Fri, 10/16/2009 - 15:23
Picture of user. Steve Joined: 07/30/2009

In reply to by tbates

Certainly something to continue to consider.

For now, we decided to keep our problem constrained and only address RAM models. I hope that soon we should be able to add type="LISREL" to the model spec and be able to address drawing from LISREL matrices. I understand there is a group at KU that is working on that problem.