umxDiffMZ | R Documentation |
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:
umxDiffMZ(
x,
y,
data,
sep = "_T",
mzZygs = c("MZFF", "MZMM"),
zyg = "zygosity",
labxy = c(-1.2, 1.8),
xylim = c(NA, NA),
digits = 2
)
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) |
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.
For a more sophisticated linear mixed model approach, see umxDiscTwin()
.
Graph for decorating
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")}.
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()
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 = "")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.