umx (version 4.0.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.

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
)

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).

Value

Details

To be added.

References

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

See Also

Other Twin Modeling Functions: plot.MxModelTwinMaker(), power.ACE.test(), umxACEcov(), umxACEv(), umxACE(), umxCP(), umxDoCp(), umxGxE_window(), umxGxEbiv(), umxGxE(), umxIP(), umxRotate.MxModelCP(), umxSexLim(), umxSimplex(), umx

Examples

Run this code
# NOT RUN {
# ========================
# = Does Rain cause Mud? =
# ========================

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

# ================
# = 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. Make the non-causal (Cholesky) and causal models =
# =======================================================
Chol = umxDoC(var1= var1, var2= var2, mzData= mzData, dzData= dzData, causal= FALSE)
DoC  = umxDoC(var1= var1, var2= var2, mzData= mzData, dzData= dzData, causal= TRUE)

# ================================================
# = Make the directional models by modifying DoC =
# ================================================
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)

var1 = paste0("SOS", 1:8)
var2 = paste0("Vocab", 1:10)
Chol = umxDoC(var1= var1, var2= var2,mzData= mzData, dzData= dzData, causal= FALSE)
DoC  = umxDoC(var1= var1, var2= var2, mzData= mzData, dzData= dzData, causal= TRUE)
a2b  = umxModify(DoC, "a2b", free = TRUE, name = "a2b")
b2a  = umxModify(DoC, "b2a", free = TRUE, name = "b2a")
Recip= umxModify(DoC, c("a2b", "b2a"), free = TRUE, name = "Recip")
umxCompare(Chol, c(a2b, b2a, Recip))

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab