plot_lavaan | R Documentation |
The plot_lavaan
function creates path diagrams for lavaan model.
The created paths diagrams are interactive.
That is, their appearance can be customized easily, for example, by dragging
around nodes representing variable with the mouse.
plot_lavaan(fit, where = "gadget")
fit |
A lavaan model, as returned by the functions |
where |
A character string to specify where the path diagram should be shown. The default value "gadget" shows it directly in Rstudio. For "browser", it's shown in your default browser. For non-RStudio users, the parameter has no effect, and the path diagram is always shown in the browser. |
nothing
library(lavaan)
model <- '
visual =~ x1 + loadingx2*x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9
'
fit <- cfa(model, data = HolzingerSwineford1939)
plot_lavaan(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.