Description Usage Arguments Details Value Author(s) References Examples

Comparison of different ACE(t)-p models to test a linear or a constant variance component.

1 | ```
test_acetp(acetp, comp, sim = 100, robust = 0, pe = TRUE, verbose = TRUE)
``` |

`acetp` |
An object from the AtCtEtp function. |

`comp` |
The component for which linearity or constancy is tested. This component must be specified as splines or linear in the AtCtEtp function. |

`sim` |
The number of the bootstrap resampling for approximating the null distribution when testing linearity. |

`robust` |
An integer indicating the number of different initial values that the function will randomly generate and try in the optimization. The default value is 0. |

`pe` |
A logical argument indicating whether to use penalized spline model to test linearity. The default value is TRUE. |

`verbose` |
A logical argument indicating whether to print testing information and results. The default value is TRUE. |

When pe=TRUE, the linearity is tested under a p-spline framework in which an LRT is performed. Otherwise, a *χ^2* test is performed for linearity under a spline framework without penalty on smoothness.

`p ` |
The p-value for the test. |

`llr ` |
The LRT statistic for testing linearity. |

`llr_sim ` |
The simulated null distribution of the LRT statistic for testing linearity. |

`chisq ` |
The chisq statistic for testing a constant or linearity. |

Liang He

He, L., Sillanp<c3><a4><c3><a4>, M.J., Silventoinen, K., Kaprio, J. and Pitk<c3><a4>niemi, J., 2016. Estimating Modifying Effect of Age on Genetic and Environmental Variance Components in Twin Models. Genetics, 202(4), pp.1313-1328.

1 2 3 4 | ```
# data(data_ace)
# result <- AtCtEtp(data_ace$mz, data_ace$dz, knot_e = 7, knot_c = 5, mod=c('d','d','l'))
# re <- test_acetp(result, comp='e')
``` |

ACEt documentation built on May 31, 2017, 3:39 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.