GA.test: Test the association between an quantitative outcome variable...

Description Usage Arguments Value Examples

View source: R/GA.R

Description

Once the preliminary work is done using "GA.prelim()", this function tests a specifc region/gene. Single SNP analyses are also incorporated.

Usage

1
2
GA.test(result.prelim,G,Gsub.id=NULL,weights='beta',B=5000, B.coef=NULL,
impute.method='fixed')

Arguments

result.prelim

The output of function "GEI.prelim()"

G

Genetic variants in the target region/gene, an m*q matrix where m is the subject ID and q is the total number of genetic variables. Note that the number of rows in Z should be same as the number of subjects.

Gsub.id

The subject id corresponding to the genotype matrix, an m dimensional vector. This is in order to match the phenotype and genotype matrix. The default is NULL, where the order is assumed to be matched with Y, X and time.

weights

Can be a numeric vector of weights for genetic variants (The length should be same as the number of genetic variants in the set.), or pre-determined weights: "beta" (beta weights as in SKAT paper), "rare" (restrited to MAF<0.01), "common" (restrited to MAF>0.01). The default is NULL, where the flat weights are applied.

B

Number of Bootstrap replicates. The default is 5000.

B.coef

Direct import of Bootstrap coefficients, an m by B matrix. This is in order to efficiently implement the Bootstrap step. The default is NULL.

impute.method

Choose the imputation method when there is missing genotype. Can be "random", "fixed" or "bestguess". Given the estimated allele frequency, "random" simulates the genotype from binomial distribution; "fixed" uses the genotype expectation; "Best guess" uses the genotype with highest probability.

Value

p.value

P-value of the set based generalized score type test.

p.single

P-values of the incorporated single SNP analyses

n.marker

number of heterozygous SNPs in the SNP set.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## GA.prelim does the preliminary data management.
# Input: Y, time, X (covariates)
## GA.test tests a region.
# Input: G (genetic variants) and result of GEI.prelim

library(LGEWIS)

# Load data example
# Y: outcomes, n by 1 matrix where n is the total number of observations
# X: covariates, n by p matrix
# time: describe longitudinal structure, n by 2 matrix
# G: genotype matrix, m by q matrix where m is the total number of subjects

data(LGEWIS.example)
Y<-LGEWIS.example$Y
X<-LGEWIS.example$X
time<-LGEWIS.example$time
G<-LGEWIS.example$G

# Preliminary data management
result.prelim<-GA.prelim(Y,time,X=X)

# test with 5000 bootstrap replicates
result<-GA.test(result.prelim,G,B=5000)

LGEWIS documentation built on May 2, 2019, 3:48 p.m.

Related to GA.test in LGEWIS...