Learn R Programming

umx (version 4.0.0)

umxPlotGxEbiv: Plot the results of a GxE univariate test for moderation of ACE components.

Description

Plot GxE results (univariate environmental moderation of ACE components). Options include plotting the raw and standardized graphs separately, or in a combined panel. You can also set the label for the x axis (xlab), and choose the location of the legend.

Usage

umxPlotGxEbiv(x, xlab = NA, location = "topleft", separateGraphs = FALSE, ...)

Arguments

x

A fitted umxGxEbiv() model to plot

xlab

String to use for the x label (default = NA, which will use the variable name)

location

Where to plot the legend (default = "topleft") see ?legend for alternatives like bottomright

separateGraphs

(default = FALSE)

...

Optional additional parameters

Value

None

References

See Also

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

Examples

Run this code
# NOT RUN {
require(umx)
data(twinData)
# }
# NOT RUN {
selDVs  = "wt"; selDefs = "ht"
df = umx_scale_wide_twin_data(twinData, varsToScale = c("ht", "wt"), suffix = "")
mzData  = subset(df, zygosity %in%  c("MZFF", "MZMM"))
dzData  = subset(df, zygosity %in%  c("DZFF", "DZMM", "DZOS"))

m1 = umxGxEbiv(selDVs = selDVs, selDefs = selDefs, 
	dzData = dzData, mzData = mzData, sep = "", dropMissingDef = TRUE)
# Plot Moderation
plot(m1)
umxPlotGxEbiv(m1, xlab = "wt", separateGraphs = TRUE, location = "topleft")
# }

Run the code above in your browser using DataLab