lavaanPlot: Plots lavaan path model with DiagrammeR

Description Usage Arguments Value Examples

View source: R/lavaanPlot.R

Description

Plots lavaan path model with DiagrammeR

Usage

1
lavaanPlot(name = "plot", model, labels = NULL, ...)

Arguments

name

A string of the name of the plot.

model

A model fit object of class lavaan.

labels

An optional named list of variable labels.

...

Additional arguments to be called to buildCall and buildPaths

Value

A Diagrammer plot of the path diagram for model

Examples

1
2
3
4
5
6
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)

lavaanPlot documentation built on Aug. 13, 2021, 5:07 p.m.