Learn R Programming

ACEt (version 1.4)

AtCtEt: The ACE(t) model

Description

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

Usage

AtCtEt(data_m, data_d, model = c('d','d','d'), knot_a = 5, knot_c = 5, knot_e = 5, 
boot=FALSE, num_b = 100)

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).
model
A character vector of length 3. Each element specifies the function for the A, C or E component respectively. The A and C components can be 'd'(dynamic), 'c'(constant) or 'n'(NA). The E component can only be 'd' or 'c'. Thus, $model=c('c','c','c')$ is cor
knot_a
The number of interior knots of the B-spline for the A component, which must be no less than 3. The default value is 5.
knot_c
The number of interior knots of the B-spline for the C component, which must be no less than 3. The default value is 5.
knot_e
The number of interior knots of the B-spline for the E component, which must be no less than 3. The default value is 5.
boot
An indicator of whether to use the bootstrap method to calculate the confidence interval. The default is FALSE.
num_b
The number of replicates when the bootstrap method is used (i.e. $boot=TRUE$). The default is 100.

Value

  • n_beta_aThe number of spline coefficients for the A component.
  • n_beta_cThe number of spline coefficients for the C component.
  • n_beta_eThe number of spline coefficients for the E component.
  • beta_aThe estimated spline coefficients (if the model parameter is 'd') or variance (if the model parameter is 'c') of the A component.
  • beta_cThe estimated spline coefficients (if the model parameter is 'd') or variance (if the model parameter is 'c') of the C component.
  • beta_eThe estimated spline coefficients (if the model parameter is 'd') or variance (if the model parameter is 'c') of the E component.
  • hessianThe approximated Hessian matrix from the minus log-likelihood.
  • conAn indicator of convergence of the optimization algorithm. An integer code 0 indicates successful completion. See 'optim' for more details.
  • likThe minus log-likelihood.
  • knots_aA vector of the knot positions for the A component.
  • knots_cA vector of the knot positions for the C component.
  • knots_eA vector of the knot positions for the E component.
  • bootA list containing confidence bands estimated from the bootstrap method when $boot=TRUE$

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 <- AtCtEt(data_ace$mz, data_ace$dz, model=c('d','d','c'))

Run the code above in your browser using DataLab