maxsel {SNPmaxsel}R Documentation

Computes maximally selected chi-square statistics

Description

The function maxsel computes the maximal chi-square statistic over some candidate binary splits specified by type.

Usage

maxsel(x1,x2=NULL,y,type="inter.ord")

Arguments

x1 a numeric vector of length n giving the values of the variable x1 for the considered n observations. The classes must be coded as 1,...,K.
x2 a numeric vector of length n giving the values of the variable x2 for the considered n observations. x2 should be NULL (default) for all types other than "inter.ord", "inter.cat" and "inter.ord.main". Since interactions are implemented for K=3 only (SNPs), x2 must be coded as 1,2,3.
y a numeric vector of length n giving the class (response variable Y) of the considered n observations. The classes must be coded as 0 and 1.
type must be one of "ordinal", "all.pairs", "all.partitions", "inter.ord", "inter.cat","inter.ord.main".

Value

the value of the maximally selected chi-square statistic.

Author(s)

Anne-Laure Boulesteix (http://www.slcmsr.net/boulesteix)

References

Boulesteix AL, Strobl C, Weidinger S, Wichmann HE, Wagenpfeil S, 2007. Multiple testing for SNP-SNP interactions. Submitted.

See Also

maxsel.asymp.test, Fasymp.

Examples

# load SNPmaxsel library
# library(SNPmaxsel)

x1<-sample(5,1000,replace=TRUE)
y<-sample(c(0,1),1000,replace=TRUE)

maxsel(x1=x1,y=y,type="ord")
maxsel(x1=x1,y=y,type="all.pairs")
maxsel(x1=x1,y=y,type="all.partitions")

x1<-sample(3,1000,replace=TRUE)
x2<-sample(3,1000,replace=TRUE)

maxsel(x1=x1,x2=x2,y=y,type="inter.ord")
maxsel(x1=x1,x2=x2,y=y,type="inter.cat")
maxsel(x1=x1,x2=x2,y=y,type="inter.ord.main")



[Package SNPmaxsel version 1.0-1 Index]