Closed tbates closed 4 years ago
This is really nice for
umxDoCp
Clean up the twinData
data(twinData)
tmp = umx_make_twin_data_nice(data=twinData, sep="", zygosity="zygosity", numbering=1:2)
tmp = umx_scale_wide_twin_data(varsToScale= c("wt", "ht"), sep= "_T", data= tmp)
mzData = subset(tmp, zygosity %in% c("MZFF", "MZMM"))
dzData = subset(tmp, zygosity %in% c("DZFF", "DZMM"))
Now make an ACE model, just describing one individual and the link function for A, C, and E, and the MZ and DZ group:
# Define paths: You only need the paths for one person:
paths = c(
umxPath(v1m0 = c("a1", 'c1', "e1")),
umxPath(means = c("wt")),
umxPath(c("a1", 'c1', "e1"), to = "wt", values=.2)
)
m1 = umxTwinMaker("test", paths, mzData = mzData, dzData= dzData)
plot(m1, std= TRUE, means= FALSE)
plot.MxModelTwinMaker