lavaanPlot | R Documentation |
Plots lavaan path model with DiagrammeR
lavaanPlot(model, name = "plot", labels = NULL, ...)
model |
A model fit object of class lavaan. |
name |
A string of the name of the plot. |
labels |
An optional named list of variable labels. |
... |
Additional arguments to be called to |
A Diagrammer plot of the path diagram for model
library(lavaan)
model <- 'mpg ~ cyl + disp + hp
qsec ~ disp + hp + wt'
fit <- sem(model, data = mtcars)
lavaanPlot(model = fit, node_options = list(shape = "box", fontname = "Helvetica"),
edge_options = list(color = "grey"), coefs = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.