R: max-statistic for a 2x3 table

maxstat {SNPassoc} | R Documentation

## max-statistic for a 2x3 table

### Description

Computes the asymptotic p-value for max-statistic for a 2x3 table

### Usage

    maxstat(x, ...)

    ## Default S3 method:
    maxstat(x, y, ...)

    ## S3 method for class 'table'
    maxstat(x, ...)

    ## S3 method for class 'setupSNP'
    maxstat(x, y, colSNPs=attr(x,"colSNPs"), ...)

    ## S3 method for class 'matrix'
    maxstat(x, ...)

### Arguments

`x` | a numeric matrix with 2 rows (cases/controls) and 3 colums (genotypes) or a vector with case/control status or an object of class 'setupSNP'.
`y` | an optional numeric vector containing the information for a given SNP. In this case 'x' argument must contain a vector indicarting case/control status. If 'x' argument is an object of class 'setupSNP' this argument migth be the name of the variable containing case/control information.
`colSNPs` | a vector indicating which columns contain those SNPs to compute max-statistic. By default max-statistic is computed for those SNPs specified when the object of class 'setupSNP' was created.
`...` | further arguments to be passed to or from methods.

### Value

A matrix with the chi-square statistic for dominant, recessive, log-additive and max-statistic and its asymptotic p-value.

### References

Gonzalez JR, Carrasco JL, Dudbridge F, Armengol L, Estivill X, Moreno V. Maximizing association statistics over genetic models (2007). Submitted

Sladek R, Rocheleau G, Rung J et al. A genome-wide association study identifies novel risk loci for type 2 diabetes (2007). Nature 445, 881-885

### See Also

`setupSNP`

### Examples

    # example from Sladek et al. (2007) for the SNP rs1111875
     tt<-matrix(c(77,298,310,122,316,231),nrow=2,ncol=3,byrow=TRUE)
     maxstat(tt)

     data(SNPs)
     maxstat(SNPs$casco,SNPs$snp10001)
     myDat<-setupSNP(SNPs,6:40,sep="")
     maxstat(myDat,casco)

[Package SNPassoc version 1.9-2 Index]