R: CARV: Comprehrensive Approach to Analyzing Rare Variants

CARV {AssotesteR} | R Documentation

## CARV: Comprehrensive Approach to Analyzing Rare Variants

### Description

The CARV method has been proposed by Hoffmann et al (2010) as an approach that determines an optimal grouping of rare variants while avoiding assumptions required by other methods for grouping such variants. The idea behind CARV is to try multiple models for rare variants, since prior information is generally not very accurate. Statistical significance is obtained by permutation.

### Usage

      CARV(y, X, waf = FALSE, signs = FALSE, approach = "hard", maf = 0.05, perm = 100)

### 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
`waf` | logical value to indicate whether weights for the variants should be calculated as in the `WSS` method (default `waf=FALSE`). See deatils below
`signs` | logical value to indicate whether signs for the variants should be calculated based on allele prevalence (`signs=FALSE` by default). See details below
`approach` | character string to indicate the type of approach to be used for variable selection; i.e. whether each variant belongs in the model for variable selection (`approach="hard"` by default). Possible options are `"hard"`, `"variable"`, and `"stepup"`. See details below
`maf` | numeric value between 0 and 1 to indicate the threshold of minor allele frequency for rare variants. Only used when `approach="hard"`
`perm` | positive integer indicating the number of permutations (100 by default)

### Details

The argument `waf` is used to specify weights of the variants in order to incorporate allele frequency information. When `waf=FALSE`, all variants have a constant unit weight. When `waf=TRUE`, the weights are calculated as in the function `WSS`, that is, weights are the inverse variance of allele frequency in controls.

The argument `signs` is used to specify the direction of the variant effect (deleterious or protective). When `signs=FALSE`, all variants have a positive sign indicating a likely deleterious effect. When `signs=TRUE`, all rare alleles that are more prevalent in controls than cases will have an associated sk=-1 (see paper in the reference); conversely, all the rare alleles that are more prevalent in cases than controls will have an associated sk=1.

The argument `approach` is used to specify whether the alle belongs in the model for variable selection. When `approach="hard"`, only variants below the predefined `maf` are included in the analysis. When `approach="variable"`, a variable threshold approach is used as in the `VT` method: all possible minor allele frequencies are considered, selecting the maximum statistic among all of them. When `approach="stepup"`, the step-up strategy described in Hoffman et al (2010) is applied.

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

### Value

An object of class `"assoctest"`, basically a list with the following elements:

`carv.stat` | carv statistic
`perm.pval` | permuted p-value
`args` | descriptive information with number of controls, cases, variants, permutations, waf, signs, approach, and maf
`name` | name of the statistic

### Author(s)

Gaston Sanchez

### References

Hoffmann TJ, Marini NJ, Witte JS (2010) Comprehensive Approach to Analyzing Rare Genetic Variants. PLoS One, 5(11): e13584

### See Also

`RARECOVER`

### Examples

      ## 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))

      # define genotype matrix with 10 variants (random data)
      set.seed(1234)
      genotype = matrix(rbinom(total*10, 2, 0.051), nrow=total, ncol=10)

      # apply CARV with "hard" approach and maf=0.05
      mycarv1 = CARV(phenotype, genotype, waf=FALSE, signs=FALSE,
         approach="hard", maf=0.05, perm=500)
      mycarv1

      # apply CARV with "variable" approach and waf=TRUE
      mycarv2 = CARV(phenotype, genotype, waf=TRUE, signs=FALSE,
         approach="variable", perm=500)
      mycarv2

      # apply CARV with "stepup" approach, waf=TRUE, and signs=TRUE
      mycarv3 = CARV(phenotype, genotype, waf=TRUE, signs=TRUE,
         approach="stepup", perm=500)
      mycarv3

    ## End(Not run)

[Package AssotesteR version 0.1-10 Index]