Description Usage Arguments Value Author(s) See Also Examples
These functions provide a convenient way to compute test statistics, e.g., two-sample Welch t-statistics, Wilcoxon statistics, F-statistics, paired t-statistics, block F-statistics, for each row of a data frame.
1 2 | mt.teststat(X,classlabel,test="t",na=.mt.naNUM,nonpara="n")
mt.teststat.num.denum(X,classlabel,test="t",na=.mt.naNUM,nonpara="n")
|
X |
A data frame or matrix, with m rows corresponding to variables
(hypotheses) andn columns to observations. In the case of gene
expression data, rows
correspond to genes and columns to mRNA samples. The data can
be read using |
classlabel |
A vector of integers corresponding to observation (column)
class labels. For k classes, the labels must be integers
between 0 and k-1. For the |
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. |
na |
Code for missing values (the default is |
nonpara |
If |
For mt.teststat
, a vector of test statistics for each row (gene).
For mt.teststat.num.denum
, a data frame with
teststat.num |
the numerator of the test statistics for each row, depending on the
specific |
teststat.denum |
the denominator of the test statistics for each row, depending on the
specific |
Yongchao Ge, yongchao.ge@mssm.edu,
Sandrine Dudoit, http://www.stat.berkeley.edu/~sandrine.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Gene expression data from Golub et al. (1999)
data(golub)
teststat<-mt.teststat(golub,golub.cl)
qqnorm(teststat)
qqline(teststat)
tmp<-mt.teststat.num.denum(golub,golub.cl,test="t")
num<-tmp$teststat.num
denum<-tmp$teststat.denum
plot(sqrt(denum),num)
tmp<-mt.teststat.num.denum(golub,golub.cl,test="f")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.