| association.test.logistic | R Documentation |
Mixed logistic regression for GWAS
association.test.logistic(
x,
Y = x@ped$pheno,
X = matrix(1, nrow(x)),
K,
beg = 1,
end = ncol(x),
algorithm = c("offset", "amle"),
eigenK,
p = 0,
...
)
x |
a bedmatrix |
Y |
phenotype vector. Default is column |
X |
A matrix of covariates (defaults to a column of ones for the intercept) |
K |
A genetic relationship matrix (or a list of such matrices) |
beg |
Index of the first SNP tested for association |
end |
Index of the last SNP tested for association |
algorithm |
Algorithm to use |
eigenK |
eigen decomposition of K (only if |
p |
Number of principal components to include in the model |
... |
Additional parameter for |
Tests the association between the phenotype and requested SNPs in x.
The phenotype Y is a binary trait. A Wald test is performed using an approximate
method defined by the parameter algorithm. All other arguments are as in
gaston::association.test.
A data frame giving for each SNP the association statistics.
association.test
data(TTN) x <- as.bed.matrix(TTN.gen, TTN.fam, TTN.bim) ## Simulation data ## set.seed(1) # some covariables X <- cbind(1, runif(nrow(x))) # A random GRM ran <- random.pm( nrow(x)) # random effects (tau = 1) omega <- lmm.simu(1, 0, eigenK=ran$eigen)$omega # linear term of the model lin <- X %*% c(0.1,-0.2) + omega # vector of probabilitues pi <- 1/(1+exp( -lin )) # vector of binary phenotypes y <- rbinom(nrow(x), 1, pi) # testing association with 1) the score test, 2) the offset algorithm, 3) the 'amle' algorithm a1 <- association.test(x, y, X, K = ran$K, method = "lmm", response = "bin") a2 <- association.test.logistic(x, y, X, K = ran$K, algorithm = "offset") a3 <- association.test.logistic(x, y, X, K = ran$K, algorithm = "amle")