TTEST: TTEST: Hotelling T2 Test

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/TTEST.R

Description

Generalized T2 test for testing association between genotype variants and binary trait (case-control)

Usage

1
  TTEST(y, X)

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

Details

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:

T2.stat

T2 statistic

asym.pval

asymptotic p-value

args

descriptive information with number of controls, cases, variants, maf, and applied test

name

name of the statistic

Author(s)

Gaston Sanchez

References

Xiong M, Zhao J, Boerwinkle E (2002) Generalized T2 Test for Genome Association Studies. The American Journal of Human Genetics, 70: 1257 - 1268

See Also

CAST

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  ## 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.05), nrow=total, ncol=10)

  # apply TTEST 
  myttest = TTEST(phenotype, genotype)
  myttest  
  
## End(Not run)

AssotesteR documentation built on May 2, 2019, 3:55 a.m.