Learn R Programming

umx (version 4.20.0)

umxPlotDoC: Plot a Direction of Causation Model.

Description

Summarize a fitted model returned by umxDoC(). Can control digits, report comparison model fits, optionally show the Rg (genetic and environmental correlations), and show confidence intervals. note: std is not implemented as yet. See documentation for other umx models here: umxSummary().

Usage

umxPlotDoC(
  x = NA,
  means = FALSE,
  std = FALSE,
  digits = 2,
  showFixed = TRUE,
  file = "name",
  format = c("current", "graphviz", "DiagrammeR"),
  SEstyle = FALSE,
  strip_zero = FALSE,
  ...
)

Value

  • Optionally return the dot code

Arguments

x

a umxDoC() model to display graphically

means

Whether to show means paths (defaults to FALSE)

std

Whether to standardize the model (defaults to TRUE)

digits

How many decimals to include in path loadings (defaults to 2)

showFixed

Whether to graph paths that are fixed but != 0 (default = TRUE)

file

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

format

= c("current", "graphviz", "DiagrammeR")

SEstyle

report "b (se)" instead of "b [lower, upper]" when CIs are found (Default FALSE)

strip_zero

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

...

Other parameters to control model summary.

References

See Also

  • umxDoC(), umxSummary.MxModelDoC(), umxModify()

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

Examples

Run this code

if (FALSE) {
# ================
# = 1. Load Data =
# ================
data(docData)
mzData = subset(docData, zygosity %in% c("MZFF", "MZMM"))
dzData = subset(docData, zygosity %in% c("DZFF", "DZMM"))

# =======================================
# = 2. Define manifests for var 1 and 2 =
# =======================================
var1 = paste0("varA", 1:3)
var2 = paste0("varB", 1:3)

# =======================================================
# = 2. Make the non-causal (Cholesky) and causal models =
# =======================================================
Chol= umxDoC(var1= var1, var2= var2, mzData= mzData, dzData= dzData, causal= FALSE)
DoC = umxDoC(var1= var1, var2= var2, mzData= mzData, dzData= dzData, causal= TRUE)

# ================================================
# = Make the directional models by modifying DoC =
# ================================================
a2b = umxModify(DoC, "a2b", free = TRUE, name = "A2B")
plot(a2b)

}

Run the code above in your browser using DataLab