# NOT RUN {
data(twinData)
# Cut to form category of 20% obese subjects
obesityLevels = c('normal', 'obese')
cutPoints = quantile(twinData[, "bmi1"], probs = .2, na.rm = TRUE)
twinData$obese1 = cut(twinData$bmi1, breaks = c(-Inf, cutPoints, Inf), labels = obesityLevels)
twinData$obese2 = cut(twinData$bmi2, breaks = c(-Inf, cutPoints, Inf), labels = obesityLevels)
ordDVs = c("obese1", "obese2")
twinData[, ordDVs] = umxFactor(twinData[, ordDVs])
mzData = twinData[twinData$zygosity %in% "MZFF",]
m1 = umxRAM("tim", data = mzData,
umxPath("bmi1", with = "bmi2"),
umxPath(v.m.= c("bmi1", "bmi2"))
)
m1 = umxRAM("tim", data = mzData,
umxPath("obese1", with = "obese2"),
umxPath(v.m.= c("obese1", "obese2"))
)
# }
Run the code above in your browser using DataLab