Description Usage Arguments Details Value References See Also Examples
epsCC.rv.test
performs a score test for a burden of
rare genetic variants under the EPS complete-case design
1 | epsCC.rv.test(nullmodel, xg, l, u, method = "simple", weights)
|
nullmodel |
an object of class |
xg |
a matrix of genetic variants to be tested against the null |
l |
cutoff for lower extreme, can be sample-specific or general |
u |
cutoff for upper extreme, can be sample-specific or general |
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.
For the EPS complete-case design, the data is only available
for individuals with high and low values of the phenotype y
;
(y < l
or y > u
), and potentialy some randomly sampled
individuals. The cut-offs l
and u
that specify the
sampling must be given in the cutoffs
argument.
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.
epsCC.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,
epsCC.test
for a common variant SNP by SNP test for
complete-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 | N = 1000
# Generate environmental covariates
xe1 = rbinom(N,1,0.5); xe2 = rnorm(N,2,1)
# Generate genetic covariates (common variants)
cv1 = rbinom(N,2,0.2); cv2 = rbinom(N,2,0.2)
# 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;
# Complete case data set
xe_CC = cbind(xe1[extreme], xe2[extreme])
xg_CC = cbind(cv1[extreme], cv2[extreme])
y_CC = y[extreme]
epsCC.rv.test(y_CC ~ xe_CC,xg = xg_CC,l,u)
# Collapsing test
epsCC.rv.test(y_CC ~ xe_CC,xg = xg_CC,method = "collapse",l,u)
# Variance component test
epsCC.rv.test(y_CC ~ xe_CC,xg = xg_CC,method = "varcomp",l,u)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.