Fasymp {SNPmaxsel} | R Documentation |
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
.
Fasymp(t,a.vec,type=NULL,groups=NULL)
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. |
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.
the value of the distribution function at t
.
Anne-Laure Boulesteix (http://www.slcmsr.net/boulesteix)
Boulesteix AL, Strobl C, Weidinger S, Wichmann HE, Wagenpfeil S, 2007. Multiple testing for SNP-SNP interactions. Submitted.
# 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)