epsAC.rv.test: Score test EPS-AC rare variants

Description Usage Arguments Details Value References See Also Examples

Description

epsAC.rv.test performs a score test for a burden of rare genetic variants under the EPS all-case design

Usage

1
epsAC.rv.test(nullmodel, xg, confounder, method = "simple", weights)

Arguments

nullmodel

an object of class formula, that describes the linear regression model under the null hypothesis

xg

a matrix of variables to be tested against the null (NA for not genotyped individuals)

confounder

(optional) vector of names of confounding (non-genetic) covariates

method

testing the burden using simple, collapse or varcomp method, see details

weights

optional weights

Details

The nullmodel formula object is of the type y~xe, which describes a regression model, y=a+be*xe+e assuming a normal distribution for the residuals (e). The covariate xe is a non-genetic/environmental covariate (optional). The variables are taken from the environment that the function is called from. The null hypothesis bg=0 is tested for the model y=a+be*xe+bg*xg+e. The covariate xg is a burden of several rare genetic variants, where missing values are coded as NA. Missing-mechanism must be MCAR or MAR. Missing-mechanism assumed equal for all genetic variants.

Confounders are discrete covariates (xe) and the distribution of xg is modelled for each level of unique value of xe.

The simple method uses a standard score test to test the burden, the collapse method tests the (weighted) sum of all variants in the burden, while the varcomp method is a (weighted) variance component score test.

The varcomp method is a special case of the popular SKAT method for a linear weighted kernel under extreme phenotype sampling. The p-value is found using the function davies in the CompQuadForm package.

Value

epsAC.rv.test returns for the whole burden of variants:

statistic

the score test statistic

p.value

the P-value

References

\insertRef

quadRpackageextremesampling,

\insertRef

wu2011SKATextremesampling

See Also

SKAT for the SKAT test for random samples, davies for the Davies method, epsAC.test for a common variant SNP by SNP test for all-case extreme sampling

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
N = 1000
# Generate environmental covariates
xe1 = rbinom(N,1,0.5); xe2 = rnorm(N,2,1)
# Generate genetic covariates (rare variants)
cv1 = rbinom(N,2,0.005); cv2 = rbinom(N,2,0.001)
# Generate phenotype
y = rnorm(N, mean = 1 + 2*xe1 + 3*xe2 + 0.5*cv1 + 0.1*cv2,2)
# Define extremes
u = quantile(y,probs = 3/4,na.rm=TRUE); l = quantile(y,probs = 1/4,na.rm=TRUE)
extreme = (y < l) | (y >= u)
cv1[!extreme] = NA; cv2[!extreme] = NA;

# All case data set
xe_AC = cbind(xe1, xe2)
xg_AC = cbind(cv1, cv2)
y_AC = y

# Simple test
epsAC.rv.test(y_AC ~ xe_AC,xg = xg_AC)
# Collapsing test
epsAC.rv.test(y_AC ~ xe_AC,xg = xg_AC,method = "collapse")
# Variance component test
epsAC.rv.test(y_AC ~ xe_AC,xg = xg_AC,method = "varcomp")

theabjorn/extremesampling documentation built on May 31, 2019, 9:10 a.m.