fa.diagram
uses the various diagram
functions to draw the diagram. fa.graph
generates dot code for external plotting. fa.rgraph
uses the Rgraphviz package (if available) to draw the graph. het.diagram
will draw "heterarchy" diagrams of factor/scale solutions at different levels.fa.diagram(fa.results,Phi=NULL,fe.results=NULL,sort=TRUE,labels=NULL,cut=.3,
simple=TRUE, errors=FALSE,g=FALSE,digits=1,e.size=.05,rsize=.15,side=2,
main,cex=NULL,marg=c(.5,.5,1,.5),adj=1, ...)
het.diagram(r,levels,cut=.3,digits=2,both=TRUE,
main="Heterarchy diagram",...)
fa.graph(fa.results,out.file=NULL,labels=NULL,cut=.3,simple=TRUE,
size=c(8,6), node.font=c("Helvetica", 14),
edge.font=c("Helvetica", 10), rank.direction=c("RL","TB","LR","BT"),
digits=1,main="Factor Analysis", ...)
fa.rgraph(fa.results,out.file=NULL,labels=NULL,cut=.3,simple=TRUE,
size=c(8,6), node.font=c("Helvetica", 14),
edge.font=c("Helvetica", 10), rank.direction=c("RL","TB","LR","BT"),
digits=1,main="Factor Analysis",graphviz=TRUE, ...)
fa.rgraph: A graph is drawn using rgraphviz. If an output file is specified, the graph instructions are also saved in the dot language.
fa.graph: the graph instructions are saved in the dot language.
fa.diagram does not use Rgraphviz and is the preferred function. fa.graph generates dot code to be used by an external graphics program. It does not have all the bells and whistles of fa.diagram, but these may be done in the external editor.
Hierarchical (bifactor) models may be drawn by specifying the g parameter as TRUE. This allows for an graphical displays of various factor transformations with a bifactor structure (e.g., bifactor
and biquartimin
. See omega
for an alternative way to find these structures.
In fa.rgraph although a nice graph is drawn for the orthogonal factor case, the oblique factor drawing is acceptable, but is better if cleaned up outside of R or done using fa.diagram.
The normal input is taken from the output of either fa
or ICLUST
. This latter case displays the ICLUST results in terms of the cluster loadings, not in terms of the cluster structure. Actually an interesting option.
It is also possible to just give a factor loading matrix as input. In this case, supplying a Phi matrix of factor correlations is also possible.
It is possible, using fa.graph, to export dot code for an omega solution. fa.graph should be applied to the schmid$sl object with labels specified as the rownames of schmid$sl. The results will need editing to make fully compatible with dot language plotting.
To specify the model for a structural equation confirmatory analysis of the results, use structure.diagram
instead.
omega.graph
, ICLUST.graph
, structure.diagram
to convert the factor diagram to sem modeling code.test.simple <- fa(item.sim(16),2,rotate="oblimin")
#if(require(Rgraphviz)) {fa.graph(test.simple) }
fa.diagram(test.simple)
f3 <- fa(Thurstone,3,rotate="cluster")
fa.diagram(f3,cut=.4,digits=2)
f3l <- f3$loadings
fa.diagram(f3l,main="input from a matrix")
Phi <- f3$Phi
fa.diagram(f3l,Phi=Phi,main="Input from a matrix")
fa.diagram(ICLUST(Thurstone,2,title="Two cluster solution of Thurstone"),main="Input from ICLUST")
Run the code above in your browser using DataLab