View source: R/umx_build_umxSexLim.R
umxPlotSexLim | R Documentation |
Will plot a graphical figure for a sex limitation model.
Options include digits
(rounding), showing means
or not, and which output format
is desired.
umxPlotSexLim(
x = NA,
file = "name",
digits = 2,
means = FALSE,
std = TRUE,
format = c("current", "graphviz", "DiagrammeR"),
SEstyle = FALSE,
strip_zero = TRUE,
...
)
x |
|
file |
The name of the dot file to write: NA = none; "name" = use the name of the model |
digits |
How many decimals to include in path loadings (defaults to 2) |
means |
Whether to show means paths (defaults to FALSE) |
std |
Whether to standardize the model (defaults to TRUE) |
format |
= c("current", "graphviz", "DiagrammeR") |
SEstyle |
report "b (se)" instead of "b [lower, upper]" (Default) |
strip_zero |
Whether to strip the leading "0" and decimal point from parameter estimates (default = TRUE) |
... |
Optional additional parameters |
Optionally return the dot code
umxSexLim()
, umxSummarySexLim()
Other Plotting functions:
ggAddR()
,
plot.MxLISRELModel()
,
plot.MxModel()
,
plot.MxModelTwinMaker()
,
umx
,
umxPlot()
,
umxPlotACE()
,
umxPlotACEcov()
,
umxPlotACEv()
,
umxPlotCP()
,
umxPlotDoC()
,
umxPlotFun()
,
umxPlotGxE()
,
umxPlotGxEbiv()
,
umxPlotIP()
,
umxPlotSimplex()
## Not run:
require(umx)
umx_set_optimizer("SLSQP")
data("us_skinfold_data")
# Rescale vars
us_skinfold_data[, c('bic_T1', 'bic_T2')] = us_skinfold_data[, c('bic_T1', 'bic_T2')]/3.4
us_skinfold_data[, c('tri_T1', 'tri_T2')] = us_skinfold_data[, c('tri_T1', 'tri_T2')]/3
us_skinfold_data[, c('caf_T1', 'caf_T2')] = us_skinfold_data[, c('caf_T1', 'caf_T2')]/3
us_skinfold_data[, c('ssc_T1', 'ssc_T2')] = us_skinfold_data[, c('ssc_T1', 'ssc_T2')]/5
us_skinfold_data[, c('sil_T1', 'sil_T2')] = us_skinfold_data[, c('sil_T1', 'sil_T2')]/5
# Data for each of the 5 twin-type groups
mzmData = subset(us_skinfold_data, zyg == 1)
mzfData = subset(us_skinfold_data, zyg == 2)
dzmData = subset(us_skinfold_data, zyg == 3)
dzfData = subset(us_skinfold_data, zyg == 4)
dzoData = subset(us_skinfold_data, zyg == 5)
# ==========================
# = Run univariate example =
# ==========================
m1 = umxSexLim(selDVs = "bic", sep = "_T", A_or_C = "A", autoRun= FALSE,
mzmData = mzmData, dzmData = dzmData,
mzfData = mzfData, dzfData = dzfData,
dzoData = dzoData
)
m1 = mxTryHard(m1)
umxPlotSexLim(m1)
plot(m1) # no need to remember a special name: plot works fine!
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.