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)
``` |

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

`comp` |
The component to test linearity or constant. The variance of this component must be dynamic or linear in the object from 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. |

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ää, M.J., Silventoinen, K., Kaprio, J. and Pitkä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')
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

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.