umxDiffMZ: MZ differences method for testing evidence for causality.

View source: R/umxDoC.R

umxDiffMZR Documentation

MZ differences method for testing evidence for causality.

Description

umxDiffMZ implements the simple twin1-twin2 based correlation method, e.g. De Moor (2008), in which MZ differences on a variable x asserted to be causal of an outcome variable y are tested for association with differences on y. The logic of the design is shown below:

Figure: MZ differences model

Usage

umxDiffMZ(
  x,
  y,
  data,
  sep = "_T",
  mzZygs = c("MZFF", "MZMM"),
  zyg = "zygosity",
  labxy = c(-1.2, 1.8),
  xylim = c(NA, NA),
  digits = 2
)

Arguments

x

Presumed causal variable, e.g. "effort"

y

Presumed caused outcome, e.g. "score"

data

Dataframe containing the twin data.

sep

The separator "_T" used to make twin var names from x and y.

mzZygs

The MZ zygosity codes c("MZFF", "MZMM")

zyg

The column containing "zygosity" data

labxy

Where to locate the R2 label (default = c(x=-2,y=3))

xylim

= clip x any axes to range, e.g c(-3,-3)

digits

Rounding for beta (def2)

Details

Example output is shown below, with the fitted line and fit inscribed. The plot is just a ggplot graph that is returned and can be edited and formatted.

Figure: MZ differences model

For a more sophisticated linear mixed model approach, see umxDiscTwin().

Value

  • Graph for decorating

References

  • De Moor, M. H., Boomsma, D. I., Stubbe, J. H., Willemsen, G., & de Geus, E. J. (2008). Testing causality in the association between regular exercise and symptoms of anxiety and depression. Archives of General Psychiatry, 65(8), 897-905. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1001/archpsyc.65.8.897")}.

See Also

  • umxDoC(), umxDiscTwin(), umxMR()

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

Examples

data(twinData)
umxDiffMZ(x="ht", y="wt", labxy = c(-.5, 3), data = twinData, sep = "")
umxDiffMZ(x="ht", y="wt", xylim = c( -2, 2), data = twinData, sep = "")

tbates/umx documentation built on Dec. 14, 2024, 11:28 a.m.