mt.sample.teststat {multtest}  R Documentation 
These functions provide tools to investigate the permutation distribution of test statistics, raw (unadjusted) pvalues, and class labels.
mt.sample.teststat(V,classlabel,test="t",fixed.seed.sampling="y",B=10000,na=.mt.naNUM,nonpara="n") mt.sample.rawp(V,classlabel,test="t",side="abs",fixed.seed.sampling="y",B=10000,na=.mt.naNUM,nonpara="n") mt.sample.label(classlabel,test="t",fixed.seed.sampling="y",B=10000)
V 
A numeric vector containing the data for one of the variables (genes). 
classlabel 
A vector of integers corresponding to observation (column)
class labels. For k classes, the labels must be integers
between 0 and k1. For the blockf test option,
observations may be divided into
n/k blocks of k observations each. The observations are
ordered by block, and within each block, they are labeled using the
integers 0 to k1.

test 
A character string specifying the statistic to be
used to test the null hypothesis of no association between the
variables and the class labels. If test="t" , the tests are based on twosample Welch tstatistics
(unequal variances). If test="t.equalvar" , the tests are based on twosample
tstatistics with equal variance for the two samples. The
square of the tstatistic is equal to an Fstatistic for k=2. If test="wilcoxon" , the tests are based on standardized rank sum Wilcoxon statistics.If test="f" , the tests are based on Fstatistics.If test="pairt" , the tests are based on paired tstatistics. The
square of the paired tstatistic is equal to a block Fstatistic for k=2. If test="blockf" , the tests are based on Fstatistics which
adjust for block differences
(cf. twoway analysis of variance).

side 
A character string specifying the type of rejection region. If side="abs" , twotailed tests, the null hypothesis is rejected for large absolute values of the test statistic.If side="upper" , onetailed tests, the null hypothesis is rejected for large values of the test statistic.If side="lower" , onetailed tests, the null hypothesis is rejected for small values of the test statistic.

fixed.seed.sampling 
If fixed.seed.sampling="y" , a
fixed seed sampling procedure is used, which may double the
computing time, but will not use extra memory to store the
permutations. If fixed.seed.sampling="n" , permutations will
be stored in memory. For the blockf test, the option n was not implemented as it requires too much memory.

B 
The number of permutations. For a complete
enumeration, B should be 0 (zero) or any number not less than
the total number of permutations.

na 
Code for missing values (the default is .mt.naNUM=93074815.62 ).
Entries with missing values will be ignored in the computation,
i.e., test statistics will be based on a smaller sample size. This
feature has not yet fully implemented.

nonpara 
If nonpara ="y", nonparametric test statistics are computed based on ranked data. If nonpara ="n", the original data are used.

For mt.sample.teststat
, a vector containing B
permutation test statistics.
For mt.sample.rawp
, a vector containing B
permutation unadjusted pvalues.
For mt.sample.label
, a matrix containing B
sets of permuted class labels. Each row corresponds to one permutation.
Yongchao Ge, yongchao.ge@mssm.edu,
Sandrine Dudoit, http://www.stat.berkeley.edu/~sandrine.
# Gene expression data from Golub et al. (1999) data(golub) mt.sample.label(golub.cl,B=10) permt<mt.sample.teststat(golub[1,],golub.cl,B=1000) qqnorm(permt) qqline(permt) permt<mt.sample.teststat(golub[50,],golub.cl,B=1000) qqnorm(permt) qqline(permt) permp<mt.sample.rawp(golub[1,],golub.cl,B=1000) hist(permp)