Learn R Programming

psych (version 1.0-80)

dia.rect: Helper functions for drawing path model diagrams

Description

Path models are used to describe structural equation models or cluster analytic output. These functions provide the primitives for drawing path models. Used as a substitute for some of the functionality of Rgraphviz.

Usage

dia.rect(x, y = NULL, labels = NULL,  cex = 1,  xlim = c(0, 1), ylim = c(0, 1), ...)
 dia.ellipse(x, y = NULL, labels = NULL, cex=1,e.size=.05, xlim=c(0,1), ylim=c(0,1),  ...) 
dia.ellipse1(x,y,segments=51,e.size=.05,xlim=c(0,1),ylim=c(0,1),...)
dia.arrow(from,to,labels=NULL,scale=1,radius1=0,radius2=0,cex=1,...)
dia.curve(from,to,labels=NULL,scale=1,...)
dia.self(location,labels=NULL,scale=.8,side=2,...)

Arguments

x
x coordinate of a rectangle or ellipse
y
y coordinate of a rectangle or ellipse
radius1
start the arrows at the endpoint - radius1
radius2
stop the arrows at the endpoint - radius2
e.size
The size of the ellipse (scaled by the number of variables
labels
Text to insert in rectangle, ellipse, or arrow
cex
adjust the text size
segments
precision with which to drawn the ellipses
scale
modifies size of rectangle and ellipse
from
arrows and curves go from
to
arrows and curves go to
location
where is the rectangle?
xlim
default ranges
ylim
default ranges
side
Which side of boxes should errors appear
...
Most graphic parameters may be passed here

Value

  • Graphic output

Details

These functions are the graphic primitives used by fa.diagram, omega.diagram, and ICLUST.diagram. They create rectangles or ellipses surrounding text, connect them to straight or curved arrows, and can draw an arrow from and to the same rectangle.

Each elipse and rectangle has a left, right, top and bottom coordinate that is used to connect the arrows.

These functions were developed to get around the infelicities associated with trying to install Rgraphviz and graphviz.

Better documentation will be added as these functions get improved. Currently the functions are just a work around for Rgraphviz.

See Also

fa.diagram, omega.diagram, and ICLUST.diagram.

Examples

Run this code
v9 <- sim.hierarchical()
f3 <- fa(v9,3,rotate="cluster")
fa.diagram(f3,error=TRUE,side=3)

Run the code above in your browser using DataLab