Learn R Programming

modelbpp (version 0.1.6)

plot.model_graph: Plot a Network of Models

Description

Plot a network of models generated by model_graph().

Usage

# S3 method for model_graph
plot(x, ...)

Value

NULL. Called for its side effect.

Arguments

x

The output of model_graph(). (Named x because it is required in the naming of arguments of the plot generic function.)

...

Additional arguments, passed to the plot-method of an igraph object.

Details

This function is the plot method of model_graph objects, the output of model_graph().

For now, it simply passes the object to plot-method of an igraph object. This function is created for possible customization of the plot in the future.

See Also

model_graph()

Examples

Run this code

library(lavaan)

dat <- dat_path_model

mod <-
"
x3 ~ a*x1 + b*x2
x4 ~ a*x1
ab := a*b
"

fit <- sem(mod, dat_path_model, fixed.x = TRUE)

out <- model_set(fit)
out

g <- model_graph(out)
plot(g)

Run the code above in your browser using DataLab