omniLRT_fast: Composite kernel machine regression based likelihood ratio...

Description Usage Arguments Value Examples

Description

Composite kernel machine regression based likelihood ratio test. The approximate method for likelihood ratio test tend to be too conservative for small alpha values. We recommend not using it in GWAS

Usage

1
2
omniLRT_fast(y, X, K1, K2, N = 10000, length.lambda = 200,
  length.rho = 21)

Arguments

y

: y is the vecgtor of the continous outcomes.

X

: X denotes the additional covariates.

K1

: K1 is the first kernel corresponding to the genetic main effect.

K2

: K2 is the second kernel corresponding to the genetic and environment interaction effect.

N

: N is th total number of randomly generated normal variables used to generate the emprical null distribution of LRT. Default value is 10,000.

length.lambda

: the length of lambda. Dafult value is 200. The values of lambda are all more than 0.

length.rho

: the length of rho. Default value is 21. The values of rho are between 0 and 1.

Value

the result is a list containing three elements. 1. p.dir is the p-value of likelihood ratio test based on emprical distrition. 2. p.aud is the p-value by approximating the null distribution as a mixture of a point mass at zero with probability b and weighted chi square distribution with d degrees of freedom with probality of 1-b. 3. LR is the likelihood ratio test statistics.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(6)
n = 50 # the number of observations
X = rnorm(n) # the other covariates
p = 2 # two snp in a gene will be simulated
G = runif(n*p)< 0.5
G = G + runif(n*p) < 0.5
G = matrix(G, n,p) #genetic matrix
E = (runif(n) < 0.5)^2 #enviroment effect
y = rnorm(n) + G[,1] * 0.3 #observations
omniLRT_fast(y, X =  cbind(X, E),K1 = G %*% t(G),K2 = (G*E) %*% t(G * E))

andrewhaoyu/CKLRT documentation built on May 16, 2019, 11:05 a.m.