umxPlotGxE {umx}R Documentation

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

umxPlotGxE(
  x,
  xlab = NA,
  location = "topleft",
  separateGraphs = FALSE,
  acergb = c("red", "green", "blue", "black"),
  gg = TRUE,
  moderatorValues = NULL,
  ...
)

Arguments

x

A fitted umxGxE() 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)

acergb

Colors to use for plot c(a = "red", c = "green", e = "blue", tot = "black")

gg

Use ggplot2 (default = TRUE)

moderatorValues

If you want to pass in your own list of moderator values instead of the real ones in the data (Default = NULL)

...

Optional additional parameters

Details

note: If gg=TRUE, the plots are drawn in ggplot, and also returned as a list(raw, std) so you can edit them.

Value

None

References

See Also

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

Examples

## Not run: 
require(umx)
data(twinData)
twinData$age1 = twinData$age2 = twinData$age
mzData = subset(twinData, zygosity == "MZFF")
dzData = subset(twinData, zygosity == "DZFF")
m1= umxGxE(selDVs= "bmi", selDefs= "age", dzData= dzData, mzData= mzData, sep="", tryHard="yes")
plot(m1)
# Directly call umxPlotGxE
umxPlotGxE(m1, xlab = "Age", separateGraphs = TRUE, gg = FALSE)
umxPlotGxE(m1, moderatorValues=18:67)

## End(Not run)


[Package umx version 4.20.0 Index]