snp_MAX3 | R Documentation |
Compute the MAX3 statistic, which tests for three genetic models (additive, recessive and dominant).
snp_MAX3(Gna, y01.train, ind.train = rows_along(Gna), val = c(0, 0.5, 1))
Gna |
A FBM.code256
(typically |
y01.train |
Vector of responses, corresponding to |
ind.train |
An optional vector of the row indices that are used, for the training part. If not specified, all rows are used. Don't use negative indices. |
val |
Computing
|
P-values associated with returned scores are in fact the minimum of the p-values of each test separately. Thus, they are biased downward.
An object of classes mhtest
and data.frame
returning one
score by SNP. See methods(class = "mhtest")
.
Zheng, G., Yang, Y., Zhu, X., & Elston, R. (2012). Robust Procedures. Analysis Of Genetic Association Studies, 151-206. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/978-1-4614-2245-7_6")}.
set.seed(1)
# constructing a fake genotype big.matrix
N <- 50; M <- 1200
fake <- snp_fake(N, M)
G <- fake$genotypes
G[] <- sample(as.raw(0:3), size = length(G), replace = TRUE)
G[1:8, 1:10]
# Specify case/control phenotypes
fake$fam$affection <- rep(1:2, each = N / 2)
# Get MAX3 statistics
y01 <- fake$fam$affection - 1
str(test <- snp_MAX3(fake$genotypes, y01.train = y01))
# p-values are not well calibrated
snp_qq(test)
# genomic control is not of much help
snp_qq(snp_gc(test))
# Armitage trend test (well calibrated because only one test)
test2 <- snp_MAX3(fake$genotypes, y01.train = y01, val = 0.5)
snp_qq(test2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.