Learn R Programming

umx (version 1.4.0)

umxGxE: umxGxE

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 (usuaally 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, suffix = NULL, lboundACE = NA, lboundM = NA, dropMissingDef = FALSE, autoRun = getOption("umx_auto_run"))

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)
suffix
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.

Value

- GxE mxModel

Details

The following figure the GxE model as a path diagram: GxE.png

References

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

See Also

- plot() and umxSummary() work for IP, CP, GxE, SAT, and ACE models.

Other Twin Modeling Functions: plot.MxModel, umxACESexLim, umxACEcov, umxACE, umxCF_SexLim, umxCP, umxGxE_window, umxIP, umxPlotACEcov, umxPlotCP, umxPlotGxE, umxPlotIP, umxSummaryACEcov, umxSummaryACE, umxSummaryCP, umxSummaryGxE, umxSummaryIP, umx_make_TwinData, umx

Examples

Run this code
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, dropMissing = TRUE)
# Plot Moderation
umxSummaryGxE(m1)
umxSummary(m1, location = "topright")
umxSummary(m1, separateGraphs = FALSE)
m2 = umxModify(m1, "am_.*", regex=TRUE, comparison = TRUE)

Run the code above in your browser using DataLab