Entering edit mode
Stefanie Scheid
▴
20
@stefanie-scheid-316
Last seen 10.2 years ago
Hi,
after using multtest to calculate Wilcoxon test statistics for
original
and for permuted class labels, three questions appeared:
1. What is calculated by mt.teststat ("stat.orig")?
The Wilcoxon statistic is defined as the ranksum of one of the two
samples
after joining. In my simple example "a1" is the ranksum which is not
equal
to "stat.orig". Actually, the function wilcox.test gives a third
result
which is the ranksum minus its theoretical minimum ("b1"=="b2").
2. What is calculated my mt.sample.teststat ("stat.perm")?
Here, the calculated Wilcoxon statistics seem to be standardized. Why
is
the original value not standardized ("stat.orig"!="a2")?
3. What is the difference between fixed.seed.sampling="y" and "n"?
Each time I run the example the permuted values stay fixed. Is there
way
to calculate values with random seeds?
Thanks a lot,
Stefanie.
index <- c(rep(0,5),rep(1,5))
value <- c(3,6.5,2,1,1.5,6,9,8,0,3.5)
expr <- t(matrix(value,10,2)) # a very correlated expression matrix
:-)
stat.orig <- mt.teststat(expr,index,test="wilcoxon")
stat.perm1 <- apply(expr, 1, mt.sample.teststat, index,
test="wilcoxon",
B=10, nonpara="n", fixed.seed.sampling="n")
stat.perm2 <- apply(expr, 1, mt.sample.teststat, index,
test="wilcoxon",
B=10, nonpara="n", fixed.seed.sampling="y")
a1 <- sum(rank(expr[1,])[6:10])
a2 <- (sum(rank(expr[1,])[6:10])-5*11/2)/sqrt(25*11/12)
b1 <- wilcox.test(value[1:5],value[6:10])$statistic
b2 <- sum(rank(expr[1,])[1:5])-5*6/2
---
Stefanie Scheid
Max Planck Institute for Molecular Genetics
Dept. of Computational Molecular Biology
Ihnestra?e 63-73
D-14195 Berlin, Germany
phone: +49 (0)30 8413 1178
fax: +49 (0)30 8413 1152
http://www.molgen.mpg.de/~scheid
email: stefanie.scheid@molgen.mpg.de