Learn R Programming

umx (version 1.4.0)

plot.MxModel: Create a graphical figure from an MxModel

Description

Create graphical path diagrams from your OpenMx models!

Usage

"plot"(x = NA, std = FALSE, digits = 2, file = "name", pathLabels = c("none", "labels", "both"), fixed = TRUE, means = TRUE, resid = c("circle", "line", "none"), showFixed = TRUE, showMeans = NULL, ...)

Arguments

x
An mxModel from which to make a path diagram
std
Whether to standardize the model (default = FALSE).
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
pathLabels
Whether to show labels on the paths. both will show both the parameter and the label. ("both", "none" or "labels")
fixed
Whether to show fixed paths (defaults to TRUE)
means
Whether to show means or not (default = TRUE)
resid
How to show residuals and variances default is "circle". Options are "line" & "none"
showFixed
Deprecated: just use 'fixed = TRUE'
showMeans
Deprecated: just use 'means = TRUE'
...
Optional parameters

Details

plot() produces SEM diagrams in graphviz format, and relies on DiagrammeR (or a graphviz application) to create the image. The commercial application Omnigraffle is great for editing these images.

On unix and windows, plot() will create a pdf and open it in your default pdf reader.

If you use umx_set_plot_format("graphviz"), files will open in with a graphviz helper.

Note: DiagrammeR is supported out of the box. If you use graphviz, we try and use that app, but YOU HAVE TO INSTALL IT! On OS X we try and open an app: you may need to associate the ‘.gv’ extension with the 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”.

References

- http://www.github.com/tbates/umx, https://en.wikipedia.org/wiki/DOT_(graph_description_language)

See Also

- umx_set_plot_format, plot.MxModel, umxPlotACE, umxPlotCP, umxPlotIP, umxPlotGxE,

Other Plotting functions: umxPlotACEcov, umxPlotACE, umxPlotCP, umxPlotGxE, umxPlotIP

Other Reporting functions: RMSEA.MxModel, RMSEA.summary.mxmodel, RMSEA, confint.MxModel, extractAIC.MxModel, loadings, logLik.MxModel, residuals.MxModel, umxCI_boot, umxCI, umxCompare, umxExpCov, umxExpMeans, umxFitIndices, umxPlotACEcov, umxPlotACE, umxPlotCP, umxPlotGxE, umxPlotIP, umxSummary.MxModel, umxSummaryACE, umx_drop_ok, umx_standardize_RAM

Other Twin Modeling Functions: umxACESexLim, umxACEcov, umxACE, umxCF_SexLim, umxCP, umxGxE_window, umxGxE, umxIP, umxPlotACEcov, umxPlotCP, umxPlotGxE, umxPlotIP, umxSummaryACEcov, umxSummaryACE, umxSummaryCP, umxSummaryGxE, umxSummaryIP, umx_make_TwinData, umx

Examples

Run this code
require(umx)
data(demoOneFactor)
latents  = c("G")
manifests = names(demoOneFactor)
m1 <- umxRAM("One Factor", data = mxData(cov(demoOneFactor), type = "cov", numObs = 500),
	umxPath(latents, to = manifests),
	umxPath(var = manifests),
	umxPath(var = latents, fixedAt = 1.0)
)
plot(m1)

Run the code above in your browser using DataLab