maxsel.asymp.test: Test of independence based on maximally selected statistics

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

View source: R/maxsel.asymp.test.r

Description

The function maxsel.test computes the probability that the maximally selected chi-square statistic is <= than the value observed from the data, under the null-hypothesis of no association between X and Y, given the proportions of observations with X=1,...,X=K. The candidate binary splits over which the chi-square statistic is maximized is specified by type. If x denotes the output of the function maxsel.asymp.test, 1-x may be seen as the p-value of an independence test.

Usage

1

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".

Details

See Boulesteix et al (2007).

Value

maxselstat

the observed maximally selected statistic.

value

the value of the distribution function of the maximally selected statistic at maxselstat.

Author(s)

Anne-Laure Boulesteix (http://www.ibe.med.uni-muenchen.de/organisation/mitarbeiter/020_professuren/boulesteix/index.html)

References

Boulesteix AL, Strobl C, Weidinger S, Wichmann HE, Wagenpfeil S, 2007. Multiple testing for SNP-SNP interactions. Statistical Applications in Genetics and Molecular Biology 6:37.

See Also

maxsel, Fasymp.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# load SNPmaxsel library
# library(SNPmaxsel)

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

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

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

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

SNPmaxsel documentation built on May 2, 2019, 8:33 a.m.