umx (version 1.9.1)

umxGxE: umxGxE: Implements ACE models with moderation of paths, e.g. by SES.

Description

Make a 2-group GxE (moderated ACE) model (Purcell, 2002). GxE interaction studies test the hypothesis that the strength of genetic (or environmental) influence varies parametrically (usually linear effects on path estimates) across levels of environment. umxGxE allows detecting, testing, and visualizing G xE (or C or E x E) interaction forms.

Usage

umxGxE(name = "G_by_E", selDVs, selDefs, dzData, mzData, sep = NULL,
  lboundACE = NA, lboundM = NA, dropMissingDef = FALSE,
  autoRun = getOption("umx_auto_run"), optimizer = NULL, suffix = NULL)

Arguments

name

The name of the model (defaults to "G_by_E")

selDVs

The dependent variable (e.g. IQ)

selDefs

The definition variable (e.g. socio economic status)

dzData

The DZ dataframe containing the Twin 1 and Twin 2 DV and moderator (4 columns)

mzData

The MZ dataframe containing the Twin 1 and Twin 2 DV and moderator (4 columns)

sep

Expand variable base names, i.e., "_T" makes var -> var_T1 and var_T2

lboundACE

= numeric: If !is.na, then lbound the main effects at this value (default = NA)

lboundM

= numeric: If !is.na, then lbound the moderators at this value (default = NA)

dropMissingDef

Whether to automatically drop missing def var rows for the user (gives a warning) default = FALSE

autoRun

Whether to run the model, and return that (default), or just to create it and return without running.

optimizer

optionally set the optimizer (default NULL does nothing)

suffix

Use sep instead (deprecated)

Value

- GxE mxModel

Details

The following figure the GxE model as a path diagram:

References

- Purcell, S. (2002). Variance components models for gene-environment interaction in twin analysis. Twin Research, 6, 554-571. Retrieved from https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&dopt=Citation&list_uids=12573187

See Also

- plot(), umxSummary, umxReduce

Other Twin Modeling Functions: plot.MxModel, umxACESexLim, umxACE_cov_fixed, umxACEcov, umxACEv, umxACE, umxCF_SexLim, umxCP, umxGxE_window, umxIP, umxPlotACEcov, umxPlotCP, umxPlotGxE, umxPlotIP, umxReduceACE, umxSummaryACEcov, umxSummaryACEv, umxSummaryACE, umxSummaryCP, umxSummaryGxE, umxSummaryIP, umx_long2wide, umx_wide2long, umx, xmu_twin_check

Examples

Run this code
# NOT RUN {
require(umx)
data(twinData) 
twinData$age1 = twinData$age2 = twinData$age
selDVs  = c("bmi1", "bmi2")
selDefs = c("age1", "age2")
selVars = c(selDVs, selDefs)
mzData  = subset(twinData, zyg == 1, selVars)[1:80,]
dzData  = subset(twinData, zyg == 3, selVars)[1:80,]
m1 = umxGxE(selDVs = selDVs, selDefs = selDefs, 
	dzData = dzData, mzData = mzData, dropMissingDef = TRUE)
# Plot Moderation
umxSummaryGxE(m1)
umxSummary(m1, location = "topright")
umxSummary(m1, separateGraphs = FALSE)
m2 = umxModify(m1, "am_.*", regex=TRUE, comparison = TRUE)
# }
# NOT RUN {
# The umxReduce function knows how to test all relevant hypotheses
# about model reduction for GxE models, reporting these in a nice table.
umxReduce(m1)
# }

Run the code above in your browser using DataCamp Workspace