| plot.MxLISRELModel | R Documentation |
plot.MxLISRELModel produces SEM diagrams using [DiagrammeR::DiagrammeR() to create the image.
## 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,
splines = c("TRUE", "FALSE", "compound", "ortho", "polyline"),
min = NULL,
same = NULL,
max = NULL,
...
)
x |
A LISREL |
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) |
splines |
Whether to allow lines to curve: defaults to "TRUE" (nb: some models look better with "FALSE") |
min |
optional list of objects to group at the top of the plot. Default (NULL) chooses automatically. |
same |
optional list of objects to group at the same rank in the plot. Default (NULL) chooses automatically. |
max |
optional list of objects to group at the bottom of the plot. Default (NULL) chooses automatically. |
... |
Optional parameters |
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.
https://github.com/tbates/umx, https://en.wikipedia.org/wiki/DOT_(graph_description_language)
umx_set_plot_format(), umx_set_auto_plot(), umx_set_plot_format(), plot.MxModel(), umxPlotACE(), umxPlotCP(), umxPlotIP(), umxPlotGxE()
Other Plotting functions:
ggAddR(),
plot.MxModel(),
plot.MxModelTwinMaker(),
umx,
umxPlot(),
umxPlotACE(),
umxPlotACE_DE(),
umxPlotACE_GLM(),
umxPlotACEcov(),
umxPlotACEv(),
umxPlotCP(),
umxPlotDoC(),
umxPlotFun(),
umxPlotGxE(),
umxPlotGxEbiv(),
umxPlotIP(),
umxPlotPredict(),
umxPlotSexLim(),
umxPlotSimplex()
## Not run:
library(umx)
data(demoOneFactor)
manifests = names(demoOneFactor)
m1 = umxLISREL("one_factor", data = demoOneFactor, type = "cov",
umxPath("G", to = manifests),
umxPath(var = manifests),
umxPath(var = "G", fixedAt = 1))
plot(m1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.