Fasymp {SNPmaxsel}R Documentation

Asymptotical distribution of the maximally selected chi-square statistic

Description

This function computes the asymptotical distribution of the maximally selected chi-square statistic, where maximal selection is performed over the test statistics defined by type or user-defined through groups.

Usage

Fasymp(t,a.vec,type=NULL,groups=NULL)

Arguments

t the value at which the distribution function has to be computed.
a.vec A vector of length K giving the proportion of observations in each category. Its sum must be 1. If type="inter.ord" or "inter.cat", a.vec must have length 9.
type must be one of "ordinal", "all.pairs", "all.partitions", "inter.ord", "inter.cat", "inter.ord.main". If type=NULL, the chi-square statistics are computed for the groups defined by groups
groups If type=NULL, the chi-square statistics are computed for the groups defined by groups. groups must be a list with m elements, where m is the number of considered chi-square statistics. Each element is a list with two elements group1 and group2. groups$group1 and groups$group2 are numeric vectors giving the indices of the categories included in both groups. See example below.

Details

This function uses the function pmvnorm from the package mvtnorm. If the considered test statistics are defined by groups, groups should not have more than 100 elements, since the pmvnorm function becomes unstable (or computationally prohibitive) for such a high dimension.

Value

the value of the distribution function at t.

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, maxsel.

Examples

# load SNPmaxsel library
# library(SNPmaxsel)

Fasymp(t=2,a.vec=c(0.2,0.1,0.05,0.05,0.6),type="ord")
Fasymp(t=2,a.vec=c(0.2,0.1,0.05,0.05,0.6),type="all.pairs")
Fasymp(t=2,a.vec=c(0.2,0.1,0.05,0.05,0.6),type="all.partitions")

Fasymp(t=2,a.vec=c(0.2,0.1,0.1,0.1,0.05,0.05,0.05,0.05,0.3),type="inter.ord")
Fasymp(t=2,a.vec=c(0.2,0.1,0.1,0.1,0.05,0.05,0.05,0.05,0.3),type="inter.cat")

# Creating a user-defined this-is-escaped-code{ list 
# (correponding to this-is-escaped-codenormal-bracket47bracket-normal)="ord" with K=5)
my.groups<-list(list(group1=1,group2=2:5),list(group1=1:2,group2=3:5),
list(group1=1:3,group2=4:5),list(group1=1:4,group2=5))

Fasymp(t=2,a.vec=c(0.2,0.1,0.05,0.05,0.6),type=NULL,groups=my.groups)

[Package SNPmaxsel version 1.0-1 Index]