Learn R Programming

ACEt (version 1.3)

AtEtp: The AE(t)-p model

Description

The AE(t)-p model with the A and E variance components as functions with respect to age modelled by P-splines.

Usage

AtEtp(data_m, data_d, knot_a = 8, knot_e = 8, eps = 0.1)

Arguments

data_m
An $N_m$ x 3 data matrix for MZ twins. $N_m$ is the number of MZ twin pairs. The first two columns are traits and the third column is age (or other covariates).
data_d
An $N_d$ x 3 data matrix for DZ twins. $N_d$ is the number of DZ twin pairs. The first two columns are traits and the third column is age (or other covariates).
knot_a
The number of interior knots for the A component. The default value is 8.
knot_e
The number of interior knots for the E component. The default value is 8.
eps
Tolerance for convergence of the EM algorithm iterations. The default value is 0.1.

Value

  • var_b_aThe estimated variance for the penalized coefficient for the A components.
  • var_b_eThe estimated variance for the penalized coefficient for the E components.
  • beta_aThe estimated spline coefficients of the A component.
  • beta_eThe estimated spline coefficients of the E component.
  • conThe indicator of convergence of the optimization algorithm.
  • likThe minus log marginal likelihood.
  • knot_aThe values of the knots for the A component.
  • knot_eThe values of the knots for the E component.

References

Liang He, Mikko J. Sillanp��, Karri Silventoinen, Jaakko Kaprio, Janne Pitk�niemi, Estimating modifying effect of age on genetic and environmental variance components in twin models. Genetics, 2016

Examples

Run this code
data(data_ace)

result <- AtEtp(data_ace$mz[1:2000,], data_ace$dz[1:2000,])

Run the code above in your browser using DataLab