Description Usage Arguments Details Value Author(s) References See Also Examples
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.
1 |
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 |
signs |
logical value to indicate whether signs for the variants should be calculated based on allele prevalence ( |
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 ( |
maf |
numeric value between 0 and 1 to indicate the threshold of minor allele frequency for rare variants. Only used when |
perm |
positive integer indicating the number of permutations (100 by default) |
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.
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 |
Gaston Sanchez
Hoffmann TJ, Marini NJ, Witte JS (2010) Comprehensive Approach to Analyzing Rare Genetic Variants. PLoS One, 5(11): e13584
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.