Skip to contents

Estimates additive genetic (A), shared environmental (C), and unique environmental (E) variance components using Falconer's equations from monozygotic (MZ) and dizygotic (DZ) twin data.

Usage

h2_mzdz(
  mzDat = NULL,
  dzDat = NULL,
  rmz = NULL,
  rdz = NULL,
  nmz = NULL,
  ndz = NULL,
  selV = NULL,
  use = "complete.obs",
  ci = TRUE,
  bounds = FALSE,
  digits = 3
)

Arguments

mzDat

Optional data.frame containing MZ twin data.

dzDat

Optional data.frame containing DZ twin data.

rmz

Optional numeric scalar. Correlation for MZ twins.

rdz

Optional numeric scalar. Correlation for DZ twins.

nmz

Optional integer. Sample size for MZ twins.

ndz

Optional integer. Sample size for DZ twins.

selV

Character vector of length 2 specifying twin variables.

use

Correlation missing-data method passed to stats::cor(). Default is "complete.obs".

ci

Logical; if TRUE, returns approximate 95% confidence intervals.

bounds

Logical; if TRUE, constrain h2/c2/e2 estimates to \([0,1]\).

digits

Integer controlling printed rounding.

Value

A data.frame containing:

  • h2: additive genetic variance estimate.

  • c2: shared environmental variance estimate.

  • e2: unique environmental variance estimate.

  • vh2: estimated variance of h2.

  • vc2: estimated variance of c2.

  • ve2: estimated variance of e2.

  • se_h2: standard error of h2.

  • se_c2: standard error of c2.

  • se_e2: standard error of e2.

  • lcl_h2: lower 95% confidence limit for h2.

  • ucl_h2: upper 95% confidence limit for h2.

  • lcl_c2: lower 95% confidence limit for c2.

  • ucl_c2: upper 95% confidence limit for c2.

  • lcl_e2: lower 95% confidence limit for e2.

  • ucl_e2: upper 95% confidence limit for e2.

Details

Falconer's estimators are:

\(h^2 = 2(r_{MZ} - r_{DZ})\), \(c^2 = 2r_{DZ} - r_{MZ}\), and \(e^2 = 1 - r_{MZ}\).

Approximate variances are computed using $$Var(r) \approx \frac{(1-r^2)^2}{n-1}$$ Given MZ/DZ data or their correlations and sample sizes, it obtains heritability and variance estimates under an ACE model as in Gidziela et al. (2023) and Keeping (1995) .

References

Elks CE, den Hoed M, Zhao JH, Sharp SJ, Wareham NJ, Loos RJ, Ong KK (2012). “Variability in the heritability of body mass index: a systematic review and meta-regression.” Front Endocrinol (Lausanne), 3, 29. doi:10.3389/fendo.2012.00029 .

Gidziela A, Ahmadzadeh YI, Michelini G, Allegrini AG, Agnew-Blais J, Lau LY, Duret M, Procopio F, Daly E, Ronald A, Rimfeld K, Malanchini M (2023). “A meta-analysis of genetic effects associated with neurodevelopmental disorders and co-occurring conditions.” Nature Human Behaviour, 7, 642–656. ISSN 2397-3374. doi:10.1038/s41562-023-01530-y .

Keeping ES (1995). Introduction to statistical inference, Dover books on mathematics, Dover edition. Dover Publications, New York. ISBN 9780486685021.

Examples

if (FALSE) { # \dontrun{
h2_mzdz(rmz = 0.72,
        rdz = 0.33,
        nmz = 384,
        ndz = 243)
library(mvtnorm)
set.seed(12345)
selVars <- c("bmi1", "bmi2")
mzm <- as.data.frame(
  mvtnorm::rmvnorm(
    195,
    c(22.75, 22.75),
    matrix(2.66^2 * c(1, 0.67, 0.67, 1), 2)
  )
)
dzm <- as.data.frame(
  mvtnorm::rmvnorm(
    130,
    c(23.44, 23.44),
    matrix(2.75^2 * c(1, 0.32, 0.32, 1), 2)
  )
)
names(mzm) <- selVars
names(dzm) <- selVars
res <- ACE_CI(
  mzData = mzm,
  dzData = dzm,
  selV = selVars,
  n.boot = 50,
  seed = 123,
  verbose = FALSE
)
print(res)
} # }