require(umx)
data(twinData)
if (FALSE) {
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