Learn R Programming

AssotesteR (version 0.1-10)

CALPHA: CALPHA: C-alpha Score Test

Description

The C-alpha score-test of Neyman and Scott (1966) has been proposed to be used in association astudies by Neale et al (2011) in order to test the observed distributino of rare variants in cases versis controls. Under the null hypothesis of no association between the variants and the phenotype, C-alpha assumes that the distribution of counts (copies of an observed variant) should follow a binomial distribution. The C-alpha test statistic contrasts the variance of each observed count with the expected variance, assuming the binomial distribution. Under the null hypothesis, the test statistic follows a standard normal distribution

Usage

CALPHA(y, X, 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
perm
positive integer indicating the number of permutations (NULL by default)

Value

"assoctest", basically a list with the following elements:
calpha.stat
c-alpha 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, 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

Neyman J, Scott E (1966) On the use of c-alpha optimal tests of composite hypothesis. Bulletin of the International Statistical Institute, 41: 477-497

Neale BM, Rivas MA, Voight BF, Altshuler D, Devlin B, Orho-Melander M, Kathiresan S, Purcell SM, Roeder K, Daly MJ (2011) Testing for an unusual distribution of rare variants. PLoS Genetics, 7(3): e1001322

Basu S, Pan W (2011) Comparison of Statistical Tests for Disease Association With Rare Variants. Genetic Epidemiology, 35(7): 606-619

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(123)
#   genotype = matrix(rbinom(total*10, 2, 0.10), nrow=total, ncol=10)
# 
#   # apply CALPHA with 500 permutations
#   mycalpha = CALPHA(phenotype, genotype, perm=500)
# 
#   # this is what we get
#   mycalpha
#   ## End(Not run)

Run the code above in your browser using DataLab