The omxGraphviz() function in OpenMx currently draws arrows by inspecting the A and S matrices and looking for values that are non-zero. Is that the correct criteria, or should it be (value != 0 || free == TRUE)? On a related note, what is the correct criteria for drawing arrows from the M matrix? Is it (value != 0) or (value != 0 || free == TRUE)?
(value != 0 || free == TRUE || !is.na(label)) is probably the right rubric for both.
yes, that seems the rule "draw everything that is free, labeled, or != 0"
Hopefully some users invest in this function as there are a bunch of things one could see it being extended to handle:
Adding the path value to paths is number 1,
I guess too if paths are equated (label == label) that would be good thing to capture in the dot, with an = sign on the path or similar.
When confidence intervals come along, you could show non-significant paths with a dotted style.
Perhaps identify paths as fixed or free - adding a black dot to the path, like a tack, fixing it down.
Done.
Nifty. I guess these errors are due to omnigraffle.
given the values have to be accessed to build the dot file, can they be included on the paths?
Looks like matrixToPaths(fit[['S']],2) would want to be modified to include the value it finds in the path output.
Then they can be placed into the dot write-out.
digraph "univSat1" {
node [style=filled, fontname="Arial", fontsize=16]
X [shape=box, fillcolor="#a9fab1", height=0.5, width=0.5];
one [shape=triangle];
X -> X[dir=both, headport=s, tailport=s, label="0.98"];
one -> X[dir=forward, label="0.02"];
}
Triangles are, in most path diagrams, flipped so that they point up.
ahh, it's not omnigraffles error: should be
or
one [shape=polygon, sides=3, orientation=90];
Umm, what? Triangles point up, invtriangles point down: http://www.graphviz.org/doc/info/shapes.html
That's wierd: An inv triangle comes out looking 'correct' in omnigraffle.
I can sort of see how: Omnigraffle's default triangle points down but still....
I've sent them a bug report.
And they're on the case
> Thanks for the clear report; I’ve filed bug #56601 on
> this, based upon your report. I'm sorry for any
> inconvenience this is causing.