SEM diagrams
Posted on

Forums
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
(value != 0 || free == TRUE || !is.na(label)) is probably the right rubric for both.
Log in or register to post comments
In reply to (value != 0 || free == TRUE by Steve
yes, that seems the rule
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.
Log in or register to post comments
In reply to (value != 0 || free == TRUE by Steve
Done.
Done.
Log in or register to post comments
In reply to Done. by mspiegel
Nifty. I guess these errors
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"];
}
Log in or register to post comments
In reply to Nifty. I guess these errors by tbates
Triangles are, in most path
Triangles are, in most path diagrams, flipped so that they point up.
Log in or register to post comments
In reply to Triangles are, in most path by Steve
ahh, it's not omnigraffles
ahh, it's not omnigraffles error: should be
one [shape=invtriangle];
or
one [shape=polygon, sides=3, orientation=90];
Log in or register to post comments
In reply to ahh, it's not omnigraffles by tbates
Umm, what? Triangles point
Umm, what? Triangles point up, invtriangles point down: http://www.graphviz.org/doc/info/shapes.html
Log in or register to post comments
In reply to Umm, what? Triangles point by mspiegel
That's wierd: An inv triangle
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.
Log in or register to post comments
In reply to That's wierd: An inv triangle by tbates
And they're on the case >
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.
Log in or register to post comments