association.test.logistic {milorGWAS}R Documentation

Mixed logistic regression for GWAS

Description

Mixed logistic regression for GWAS

Usage

association.test.logistic(
  x,
  Y = x@ped$pheno,
  X = matrix(1, nrow(x)),
  K,
  beg = 1,
  end = ncol(x),
  algorithm = c("amle", "offset"),
  eigenK,
  p = 0,
  model = c("additive", "dominant", "recessive"),
  ...
)

Arguments

x

a bedmatrix

Y

phenotype vector. Default is column pheno of x@ped

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

p

Number of principal components to include in the model

model

Model for the effect allele (allele A2)

...

Additional parameter for gaston::logistic.mm.aireml

Details

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.

Parameter model allows to specify an additive model (genotypes A1 A1, A1 A2, and A2 A2 are recoded for analysis as 0, 1 and 2 respectively), a dominant model (genotypes recoded as 0, 1, and 1) or a recessive model (recoded as 0, 0 and 1).

All other arguments are as in gaston::association.test.

Value

A data frame giving for each SNP the association statistics.

See Also

association.test

Examples

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


[Package milorGWAS version 0.7 Index]