Learn R Programming

umx (version 4.20.0)

umxDoC: Build and run a 2-group Direction of Causation twin models.

Description

Testing causal claims is often difficult due to an inability to conduct experimental randomization of traits and situations to people. When twins are available, even when measured on a single occasion, the pattern of cross-twin cross-trait correlations can (given distinguishable modes of inheritance for the two traits) falsify causal hypotheses.

umxDoC implements a 2-group model to form latent variables for each of two traits, and allows testing whether trait 1 causes trait 2, vice-versa, or even reciprocal causation.

Using latent variables instead of a manifest measure for testing causation, avoids the bias created by differences in measurement error in which the more reliable measure appears to "cause" the less reliable one (Gillespie and Martin, 2005).

The following figure shows how the DoC model appears as a path diagram (for two latent variables X and Y, each with three indicators). Note: For pedagogical reasons, only the model for 1 twin is shown, and only one DoC pathway drawn.

Figure: Direction of Causation

Usage

umxDoC(
  name = "DoC",
  var1Indicators,
  var2Indicators,
  mzData = NULL,
  dzData = NULL,
  sep = "_T",
  causal = TRUE,
  autoRun = getOption("umx_auto_run"),
  intervals = FALSE,
  tryHard = c("no", "yes", "ordinal", "search"),
  optimizer = NULL,
  data = NULL,
  zyg = "zygosity"
)

Value

  • mxModel() of subclass MxModelDoC

Arguments

name

The name of the model (defaults to "DOC").

var1Indicators

variables defining latent trait 1

var2Indicators

variables defining latent trait 2

mzData

The MZ dataframe

dzData

The DZ dataframe

sep

The separator in twin variable names, default = "_T", e.g. "dep_T1".

causal

whether to add the causal paths (default TRUE)

autoRun

Whether to run the model (default), or just to create it and return without running.

intervals

Whether to run mxCI confidence intervals (default = FALSE)

tryHard

Default ('no') uses normal mxRun. "yes" uses mxTryHard. Other options: "ordinal", "search"

optimizer

Optionally set the optimizer (default NULL does nothing).

data

= NULL If building the MZ and DZ datasets internally from a complete data set.

zyg

= "zygosity" (for the data= method of using this function)

References

  • N.A. Gillespie and N.G. Martin (2005). Direction of Causation Models. In Encyclopedia of Statistics in Behavioral Science, 1. 496–499. Eds. Brian S. Everitt & David C. Howell.

  • McGue, M., Osler, M., & Christensen, K. (2010). Causal Inference and Observational Research: The Utility of Twins. Perspectives on Psychological Science, 5, 546-556. tools:::Rd_expr_doi("10.1177/1745691610383511")

  • Rasmussen, S. H. R., Ludeke, S., & Hjelmborg, J. V. B. (2019). A major limitation of the direction of causation model: non-shared environmental confounding. Twin Res Hum Genet, 22, 1-13. tools:::Rd_expr_doi("10.1017/thg.2018.67")

See Also

  • umxDiscTwin()

Other Twin Modeling Functions: power.ACE.test(), umxACEcov(), umxACEv(), umxACE(), umxCP(), umxDiffMZ(), umxDiscTwin(), umxDoCp(), umxGxE_window(), umxGxEbiv(), umxGxE(), umxIP(), umxMRDoC(), umxReduceACE(), umxReduceGxE(), umxReduce(), umxRotate.MxModelCP(), umxSexLim(), umxSimplex(), umxSummarizeTwinData(), umxSummaryACEv(), umxSummaryACE(), umxSummaryDoC(), umxSummaryGxEbiv(), umxSummarySexLim(), umxSummarySimplex(), umxTwinMaker(), umx

Examples

Run this code
if (FALSE) {

# ========================
# = Does Rain cause Mud? =
# ========================

# ================
# = 1. Load Data =
# ================
data(docData)
docData = umx_scale_wide_twin_data(c(var1, var2), docData, sep= "_T")
mzData  = subset(docData, zygosity %in% c("MZFF", "MZMM"))
dzData  = subset(docData, zygosity %in% c("DZFF", "DZMM"))

# =======================================
# = 2. Define manifests for var 1 and 2 =
# =======================================
var1 = paste0("varA", 1:3)
var2 = paste0("varB", 1:3)

# =======================================================
# = 3. Make the non-causal (Cholesky) and causal models =
# =======================================================
Chol = umxDoC(var1= var1, var2= var2, mzData= mzData, dzData= dzData, causal= FALSE)
# nb: DoC initially has causal paths fixed @0
DoC  = umxDoC(var1= var1, var2= var2, mzData= mzData, dzData= dzData, causal= TRUE)
a2b   = umxModify(DoC, "a2b", free = TRUE, name = "a2b"); summary(a2b)
b2a   = umxModify(DoC, "b2a", free = TRUE, name = "b2a"); summary(b2a)
Recip = umxModify(DoC, c("a2b", "b2a"), free = TRUE, name = "Recip"); summary(Recip)

# Compare fits
umxCompare(Chol, c(a2b, b2a, Recip))

# ==========================================
# = Alternative call with data in one file =
# ==========================================
data(docData)
docData = umx_scale_wide_twin_data(c(var1, var2), docData, sep= "_T")
DoC = umxDoC(var1= paste0("varA", 1:3), var2= paste0("varB", 1:3),
	  mzData= c("MZFF", "MZMM"), dzData= c("DZFF", "DZMM"), data = docData
)
}

Run the code above in your browser using DataLab