plot.MxLISRELModel: Create and display a graphical path diagram for a LISREL...

plot.MxLISRELModelR Documentation

Create and display a graphical path diagram for a LISREL model.

Description

plot.MxLISRELModel produces SEM diagrams using DiagrammeR::DiagrammeR() (or a graphviz application) to create the image.

Usage

## S3 method for class 'MxLISRELModel'
plot(
  x = NA,
  std = FALSE,
  fixed = TRUE,
  means = TRUE,
  digits = 2,
  file = "name",
  labels = c("none", "labels", "both"),
  resid = c("circle", "line", "none"),
  strip_zero = TRUE,
  ...
)

Arguments

x

A LISREL mxModel() from which to make a path diagram

std

Whether to standardize the model (default = FALSE).

fixed

Whether to show fixed paths (defaults to TRUE)

means

Whether to show means or not (default = TRUE)

digits

The number of decimal places to add to the path coefficients

file

The name of the dot file to write: NA = none; "name" = use the name of the model

labels

Whether to show labels on the paths. both will show both the parameter and the label. ("both", "none" or "labels")

resid

How to show residuals and variances default is "circle". Options are "line" & "none"

strip_zero

Whether to strip the leading "0" and decimal point from parameter estimates (default = TRUE)

...

Optional parameters

Details

Note: By default, plots open in your browser (or plot pane if using RStudio).

Opening in an external editor/app

The underlying format is graphviz. If you use umx_set_plot_format("graphviz"), figures will open in a graphviz helper app (if installed). If you use graphviz, we try and use that app, but YOU HAVE TO INSTALL IT!

On MacOS, you may need to associate the ‘.gv’ extension with your graphviz app. Find the .gv file made by plot, get info (cmd-I), then choose “open with”, select graphviz.app (or OmniGraffle professional), then set “change all”.

The commercial application “OmniGraffle” is great for editing these images.

References

See Also

  • umx_set_plot_format(), umx_set_auto_plot(), umx_set_plot_format(), plot.MxModel(), umxPlotACE(), umxPlotCP(), umxPlotIP(), umxPlotGxE()

Other Plotting functions: ggAddR(), plot.MxModelTwinMaker(), plot.MxModel(), umxPlotACEcov(), umxPlotACEv(), umxPlotACE(), umxPlotCP(), umxPlotDoC(), umxPlotFun(), umxPlotGxEbiv(), umxPlotGxE(), umxPlotIP(), umxPlotSexLim(), umxPlotSimplex(), umxPlot(), umx

Examples

# plot()
# TODO get LISREL example model
# Figure out how to map its matrices to plot. Don't do without establishing demand.

umx documentation built on May 29, 2024, 5:40 a.m.