Learn R Programming

ACEt (version 1.4)

AtCtEp: The ACE(t)-p model

Description

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

Usage

AtCtEp(data_m, data_d, knot_a = 8, knot_c = 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 centered trait values (i.e. the mean should be zero) 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 centered trait values (i.e. the mean should be zero) 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_c
The number of interior knots for the C component. The default value is 8.
eps
Tolerance for convergence of the EM algorithm iterations. The default value is 0.1.

Value

  • varThe estimated variance of the E component.
  • var_b_aThe estimated variance for the penalized coefficient for the A components.
  • var_b_cThe estimated variance for the penalized coefficient for the C components.
  • beta_cThe estimated spline coefficients of the A component.
  • beta_aThe estimated spline coefficients of the C component.
  • conAn indicator of convergence of the optimization algorithm. An integer code 0 indicates successful completion. See 'optim' for more details.
  • likThe minus log marginal likelihood.
  • knot_aThe values of the knots for the A component.
  • knot_cThe values of the knots for the C component.

References

He, L., Sillanp��, M. J., Silventoinen, K., Kaprio, J., & Pitk�niemi, J. (2016). Estimating Modifying Effect of Age on Genetic and Environmental Variance Components in Twin Models. Genetics, genetics-115.

Examples

Run this code
# data(data_ace)

# result <- AtCtEp(data_ace$mz, data_ace$dz, knot_a = 8, knot_c = 8)

Run the code above in your browser using DataLab