Learn R Programming

AssotesteR (version 0.1-10)

RWAS: RWAS: Rare-Variant Weighted Aggregate Statistic

Description

The RWAS method has been proposed by Sul et al (2011) as a pooling method that groups variants and computes a weighted sum of differences between case and control mutation counts where weights are estimated from data. Under the null hypothesis the RWAS statistic has an asymptotic standard normal distribution, but a permutation procedure can also be applied to assess statistical significance

Usage

RWAS(y, X, maf = 0.05, perm = NULL)

Arguments

y
numeric vector with phenotype status: 0=controls, 1=cases. No missing data allowed
X
numeric matrix or data frame with genotype data coded as 0, 1, 2. Missing data is allowed
maf
numeric value indicating the minor allele frequency threshold for rare variants (ma f=0.05 by default)
perm
positive integer indicating the number of permutations (NULL by default)

Value

"assoctest", basically a list with the following elements:
rwas.stat
rwas statistic
asym.pval
asymptotic p-value
perm.pval
permuted p-value, only when perm is used
args
descriptive information with number of controls, cases, variants, rare variants, maf and permutations
name
name of the statistic

Details

There is no imputation for the missing data. Missing values are simply ignored in the computations.

References

Sul JH, Han B, He D, Eskin E (2011) An Optimal Weighted Aggregated Association Test for Identification of Rare Variants Involved in Common Diseases. Genetics, 188: 181-188

See Also

CMC

Examples

Run this code
  ## Not run: 
#   
#   # number of cases
#   cases = 500
# 
#   # number of controls 
#   controls = 500
# 
#   # total (cases + controls)
#   total = cases + controls
# 
#   # phenotype vector
#   phenotype = c(rep(1, cases), rep(0, controls))
# 
#   # genotype matrix with 10 variants (random data)
#   set.seed(1234)  
#   genotype = matrix(rbinom(total*10, 2, 0.051), nrow=total, ncol=10)
# 
#   # apply RWAS with maf=0.05 and 500 permutations
#   myrwas = RWAS(phenotype, genotype, maf=0.05, perm=500)
#   myrwas
#   ## End(Not run)

Run the code above in your browser using DataLab