pathDiagram: Draw Path Diagram

Description Usage Arguments Value References See Also Examples

View source: R/pathDiagram.R

Description

pathDiagram creates a description of the path diagram for a PLS path model object of class sempls to be processed by the graph-drawing program dot; see Gansner, Koutsofios, and North (2006) and http://www.graphviz.org/.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
pathDiagram(object, ...)


## S3 method for class 'sempls'
pathDiagram(object, file, min.rank=NULL, max.rank=NULL, same.rank=NULL,
            edge.labels=c("names", "values", "both"), size=c(8,8),
            node.font=c("Helvetica", 14), edge.font=c("Helvetica", 10),
            rank.direction=c("LR", "TB"), digits=2, output.type =
            c("graphics", "dot"), graphics.fmt = "pdf", dot.options=NULL,
            rSquared=NULL, full=TRUE, ...)

Arguments

object

A sempls object

...

Arguments to be passed down to pathDiagram.sempls.

file

A file in which to write the dot description of the path diagram; if not specified, the description is written to standard output (normally the R console).

min.rank

A character string listing names of variables to be assigned minimum rank (order) in the graph; the names should be separated by commas.

max.rank

A character string listing names of variables to be assigned maximum rank in the graph; the names should be separated by commas.

same.rank

A character string or vector of character strings of variables to be assigned equivalent rank in the graph; names in each string should be separated by commas.

edge.labels

"names" to label arrows with parameter names; "values" to label arrows with parameter estimates, or both

size

The size of the graph, in inches.

node.font

Font name and point-size for printing variable names.

edge.font

Font name and point-size for printing arrow names or values.

rank.direction

Draw graph left-to-right, "LR", the default, or top-to-bottom, "TB".

digits

Number of digits after the decimal point (default, 2) to which to round parameter estimates.

output.type

If "graphics", the default, both a “.dot” file and a graphics file will be created.

graphics.fmt

A graphics format recognized by the dot program; the default is “pdf”; graphics.fmt is also used for the extension of the graphics file that is created.

dot.options

Options to be passed to the dot program, given as a character string.

rSquared

A matrix returned from method rSquared. If supplied, the R-squared values are printed in the diagram.

full

If FALSE the .dot file is created only for the structural model.

Value

pathDiagram is used for its side-effect, producing a graph description of the model.

References

Gansner, E., E. Koutsofios, and S. North (2006) Drawing graphs with dot. http://www.graphviz.org/Documentation/dotguide.pdf.

See Also

sempls, rSquared

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
### create .pdf file for the path diagram
### Note that graphviz (www.graphviz.org) must be available.
## Not run: 
pathDiagram(ecsi, file="ecsiPLS1", edge.labels="both",
            output.type="graphics", digits=3, graphics.fmt = "pdf")

# include R-squared values
rSquared <- rSquared(ecsi)
pathDiagram(ecsi, file="ecsiPLS2", edge.labels="both",
            output.type="graphics", digits=3, graphics.fmt = "pdf",
            rSquared=Rsquared)

# only the structural model
pathDiagram(ecsi, file="ecsiPLS3", edge.labels="both",
            output.type="graphics", digits=3, graphics.fmt = "pdf",
            rSquared=Rsquared, full=FALSE)

## End(Not run)

semPLS documentation built on May 2, 2019, 9:34 a.m.