docData {umx}R Documentation

Twin data for Direction of causation modelling

Description

A dataset containing indicators for two traits varA and varB, each measured in MZ and DZ twins.

Usage

data(docData)

Format

A data frame 6 manifests for each of two twins in 1400 families of MZ and DZ twins

Details

It is designed to show off umxDoC() testing the hypothesis varA causes varB, varB causes varA, both cause each other.

References

See Also

Other datasets: Fischbein_wt, GFF, iqdat, umx, us_skinfold_data

Examples

data(docData)
str(docData)
mzData = subset(docData, zygosity %in% c("MZFF", "MZMM"))
dzData = subset(docData, zygosity %in% c("DZFF", "DZMM"))
par(mfrow = c(1, 2))  # 1 rows and 3 columns
plot(varA1_T2 ~varA1_T1, ylim = c(-4, 4), data = mzData, main="MZ")
tmp = round(cor.test(~varA1_T1 + varA1_T2, data = mzData)$estimate, 2)
text(x=-4, y=3, labels = paste0("r = ", tmp))
plot(varA1_T2 ~varA1_T1, ylim = c(-4, 4), data = dzData, main="DZ")
tmp = round(cor.test(~varA1_T1 + varA1_T2, data = dzData)$estimate, 2)
text(x=-4, y=3, labels = paste0("r = ", tmp))
par(mfrow = c(1, 1))  # back to as it was

[Package umx version 4.20.0 Index]