# 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 DataLab