You are here

Path diagrams

9 posts / 0 new
Last post
izahn's picture
Offline
Joined: 09/02/2009 - 10:45
Path diagrams

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.

mspiegel's picture
Offline
Joined: 07/31/2009 - 15:24
Graphviz has a bug that

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

tbates's picture
Offline
Joined: 07/31/2009 - 14:25
despite that, still worth

despite that, still worth adding a $dot field to the output - lots of programs are available that can clean up the dot output.

i.e., provide the .dot and let people draw it themselves (Omnigraffle etc)?

mspiegel's picture
Offline
Joined: 07/31/2009 - 15:24
r932 in the subversion

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.

tbates's picture
Offline
Joined: 07/31/2009 - 14:25
thanks mike, Would be great

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.

Steve's picture
Offline
Joined: 07/30/2009 - 14:03
Certainly something to

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.

izahn's picture
Offline
Joined: 09/02/2009 - 10:45
Excellent, I fully support

Excellent, I fully support the approach of providing the .dot output and letting people draw/convert it using whatever tools they prefer. And I'm glad to hear it's in the works!

tbates's picture
Offline
Joined: 07/31/2009 - 14:25
Drupal has a graphiviz

Drupal has a graphiviz filter

http://drupal.org/project/graphviz_filter

Would be great to have that up here: Nice for including diagrams in posts.

tbates's picture
Offline
Joined: 07/31/2009 - 14:25
If any one sees bugs in

If any one sees bugs in Omnigraffle's import of .dot files, please pass them on to me and I'll file bugs with Omni. Can't hurt if you do to to let them know we care.

cheers,
tim