max3 {AssocTests} | R Documentation |
Maximum Test: maximum value of the three Cochran-Armitage trend tests under the recessive, additive, and dominant models
Description
Conduct MAX3 (the maximal value of the three Cochran-Armitage trend tests derived for the recessive, additive, and dominant models) based on the trend tests without the adjustment of the covariates or based on the Wald tests with the adjustment of the covariates to test for the association between a single-nucleotide polymorphism and the binary phenotype.
Usage
max3(
y,
g,
covariates = NULL,
Score.test = TRUE,
Wald.test = FALSE,
rhombus.formula = FALSE
)
Arguments
y |
a numeric vector of the observed trait values in which
the ith element is for the ith subject. The elements
should be |
g |
a numeric vector of the observed genotype values ( |
covariates |
a numeric matrix for the covariates used in the
model. Each column is for one covariate. The default is |
Score.test |
logical. If |
Wald.test |
logical. If |
rhombus.formula |
logical. If |
Details
In an association study, the genetic inheritance models (recessive, additive, or dominant) are unknown beforehand. This function can account for the uncertainty of the underlying genetic models and test for the association between a single-nucleotide polymorphism and a binary phenotype with or without correcting for the covariates.
Value
A list with class "htest
" containing the following components:
statistic | |||
the observed value of the test statistic. | |||
p.value | |||
the p-value for the test. | |||
alternative | |||
a character string describing the alternative hypothesis. | |||
method | |||
a character string indicating the type of test performed. | |||
data.name | |||
a character string giving the names of the data. |
Author(s)
Lin Wang, Wei Zhang, and Qizhai Li.
References
Lin Wang, Wei Zhang, and Qizhai Li. AssocTests: An R Package for Genetic Association Studies. Journal of Statistical Software. 2020; 94(5): 1-26.
Q Li, G Zheng, Z Li, and K Yu. Efficient Approximation of P Value of the Maximum of Correlated Tests, with Applications to Genome-Wide Association Studies. Annals of Human Genetics. 2008; 72(3): 397-406.
Examples
y <- rep(c(0, 1), 5)
g <- sample(c(0, 1, 2), 10, replace = TRUE)
max3(y, g, covariates = NULL, Score.test = TRUE, Wald.test = FALSE,
rhombus.formula = FALSE)
max3(y, g, covariates = matrix(sample(c(0,1), 20, replace = TRUE), ncol=2),
Score.test = TRUE, Wald.test = FALSE, rhombus.formula = FALSE)