Fasymp: Asymptotical distribution of the maximally selected...

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

View source: R/Fasymp.r

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

1

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# 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 groups list 
# (correponding to type)="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)

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

Related to Fasymp in SNPmaxsel...