Description Usage Arguments Details Value References See Also Examples
epsAC.rv.test
performs a score test for a burden of
rare genetic variants under the EPS all-case design
1 | epsAC.rv.test(nullmodel, xg, confounder, method = "simple", weights)
|
nullmodel |
an object of class |
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 |
weights |
optional weights |
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.
epsAC.rv.test
returns for the whole burden of variants:
statistic |
the score test statistic |
p.value |
the P-value |
quadRpackageextremesampling,
\insertRefwu2011SKATextremesampling
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
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.