ACE_CI: Bootstrap ACE confidence intervals

View source: R/h2_mzdz.R

ACE_CIR Documentation

Bootstrap ACE confidence intervals

Description

Estimates ACE components (additive genetic, shared environment, unique environment) using nonparametric bootstrap resampling of twin data (MZ and DZ pairs).

Usage

ACE_CI(
  mzData,
  dzData,
  selV,
  n.boot = 1000,
  conf.level = 0.95,
  use = "complete.obs",
  bounds = FALSE,
  seed = NULL,
  verbose = interactive()
)

Arguments

mzData

Data frame for monozygotic twins.

dzData

Data frame for dizygotic twins.

selV

Character vector of length 2 specifying twin variables.

n.boot

Number of bootstrap replications.

conf.level

Confidence level for percentile intervals.

use

Missing-data handling method passed to cor().

bounds

Logical; constrain ACE estimates to [0,1].

seed

Random seed for reproducibility.

verbose

Logical; show progress messages.

Value

A list containing:

  • observed: ACE estimates from original data

  • bootstrap: bootstrap replicate estimates

  • summary: bootstrap summary statistics

Examples

## Not run: 
set.seed(123)
res <- ACE_CI(mzData = mzm, dzData = dzm, selV = c("bmi1","bmi2"))
print(res)

## End(Not run)


gap documentation built on Oct. 27, 2026, 1:07 a.m.