Description Usage Arguments Details Value Examples
View source: R/plotplot_sem.R
Render a graph based on a layout, and either nodes and edges, or a model object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35  graph_sem(...)
## Default S3 method:
graph_sem(
edges = NULL,
layout = NULL,
nodes = NULL,
rect_width = 1.2,
rect_height = 0.8,
ellipses_width = 1,
ellipses_height = 1,
variance_diameter = 0.8,
spacing_x = 2,
spacing_y = 2,
text_size = 4,
curvature = 60,
angle = NULL,
fix_coord = FALSE,
...
)
## S3 method for class 'lavaan'
graph_sem(model, edges = NULL, layout = NULL, nodes = NULL, ...)
## S3 method for class 'MxModel'
graph_sem(model, edges = NULL, layout = NULL, nodes = NULL, ...)
## S3 method for class 'mplus.model'
graph_sem(model, edges = NULL, layout = NULL, nodes = NULL, ...)
## S3 method for class 'character'
graph_sem(...)
## S3 method for class 'mplusObject'
graph_sem(model, edges = NULL, layout = NULL, nodes = NULL, ...)

... 
Additional arguments passed to and from functions. 
edges 
Object of class 'tidy_edges', or a 
layout 
A matrix (or data.frame) that describes the layout; see

nodes 
Optional, object of class 'tidy_nodes', created with the

rect_width 
Width of rectangles (used to display observed variables), Default: 1.2 
rect_height 
Height of rectangles (used to display observed variables), Default: 0.8 
ellipses_width 
Width of ellipses (used to display latent variables), Default: 1 
ellipses_height 
Height of ellipses (used to display latent variables), Default: 1 
variance_diameter 
Diameter of variance circles, Default: .8 
spacing_x 
Spacing between columns of the graph, Default: 1 
spacing_y 
Spacing between rows of the graph, Default: 1 
text_size 
Point size of text, Default: 4 
curvature 
Curvature of curved edges. The curve is a circle segment
originating in a point that forms a triangle with the two connected points,
with angles at the two connected points equal to 
angle 
Angle used to connect nodes by the top and bottom. Defaults to NULL, which means Euclidean distance is used to determine the shortest distance between node sides. A numeric value between 0180 can be provided, where 0 means that only nodes with the same xcoordinates are connected toptobottom, and 180 means that all nodes are connected toptobottom. 
fix_coord 
Whether or not to fix the aspect ratio of the graph. Does not work with multigroup or multilevel models. Default: FALSE. 
model 
Instead of the edges argument, it is also possible to use the
model argument and pass an object for which a method exists (e.g.,

The default interface simply Runs the functions
prepare_graph
and
plot
. The alternative interface first runs
get_nodes
and get_edges
on
the model
argument.
Object of class 'sem_graph'
1 2 3 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.