Learn R Programming

SPAr (version 0.1)

SPA.I: Compute rare variants association test scores with and(or) without gene-gene interactions

Description

Compute the nonparametric association test scores between a set of rare variants and continous or dichotomous outcomes with and(or) without gene-gene interactions

Usage

SPA.I(x, y, nperm = 100, type = "dichotomous", interaction = 0)

Arguments

x
a matrix of numeric genotypes with each row as an individual and each column as a separate rare SNP. Each genotype should be coded as 0,1 and 2.
y
a vector of phenotypes. The length of y should be the same as the number of rows of x.
nperm
the number of permutations used to obtain the significance level.
type
a string to indicate if the phenoype is continuous or dichotomous. It could take values "dichotomous" or "continuous".
interaction
an integer indicating if the interaction is considered when computing the information score. See Details.

Value

I
The numeric value of I score. Could be a vector of 3 values if interaction=0.
pvalue
The p-value of corresponding I score.Could be a vector of 3 values if interaction=0.
nperm
Number of permutations.
call
The matched call.
type
Type of methods used. Could be "I1","I2" or "p*".

Details

There are three types of interactions: 1 - compute the score without interaction (score I1); 2 - compute the score with interaction (score I2); 0 - compute both scores with and without interaction as well as the adaptive p* score.

References

Fan, R., Lo, S-H (2013). A robust model-free approach for rare variantss association studies incorporating gene-gene and gene-environmental interactions. PLOS ONE 8(12):e83057.

Examples

Run this code
data(SPA_example)
attach(SPA_example)

## compute p-values of dichotomous traits

pstar_dich <- SPA.I(x,y.d,nperm=10) #compute I1,I2 and p* and their p-values
print(pstar_dich)

I1_dich <- SPA.I(x,y.d,interaction=1,nperm=10) # only compute I1 and its pvalue
print(I1_dich)


## compute p-values of continuous traits

pstar_cont <- SPA.I(x,y.c,nperm=10,type="cont")  #compute I1,I2 and p* and their p-values
print(pstar_cont)

I1_cont <- SPA.I(x,y.c,type="cont",interaction=1,nperm=10) # only compute I1 and its pvalue
print(I1_cont)

Run the code above in your browser using DataLab