estimate.heritability: Estimates ACE, AE, CE, and E heritability models

View source: R/estimate.heritability.R

estimate.heritabilityR Documentation

Estimates ACE, AE, CE, and E heritability models

Description

Estimate the contribution of additive genetic (A), shared (C) and individual-specific environment (E) effects on traits variations, using a classical twin design study. It fits ACE, and the most parsimonious AE, CE e E model, which are then compared using the Akaike’s information criterion (AIC). The best (lowest AIC) model is then selected. If checks.CI is set, when selecting the best model, the functions also checks that the confidence intervals (CI) do not include the zero – if they do, the next best nodel is selected and a note is returned.

Usage

estimate.heritability(
  myformula,
  data,
  DZ = "DZ",
  zyg = "ZYGOSITY",
  fid = "FID",
  checks.CI = TRUE
)

Arguments

myformula

the model to be fit (trait ~ 1 + covariate)

data

input data frame

DZ

how dyzigotic twins are codified

zyg

name of the column describing zygosities

fid

name of the column describing family ID

checks.CI

whether to check if the best model CI includes the zero, and the next model should be chosen instead

Value

a list with the following R objects: , models, a list of the heritability summary stats for each tested model, that is: , models$ACE, the results of the ACE model , models$AE, the results of the AE model , models$CE, the results of the CE model , models$E, the results of the E model , aics, AICs of all fitted models , best, label for best model (ACE, AE, CE, E) , estimate.best, the summary stats and CI for the best model , note, whether a next-best model has been used (empty if check.CI is FALSE)

Author(s)

Alessia Visconti


alesssia/timesaveR documentation built on Jan. 26, 2024, 5:21 p.m.