hi, when performing a wilcox.test or a wilcox.exact i get results that looks like this: wilcox.exact(x, mu=.5) Exact Wilcoxon signed rank test data: x V = 207, p-value = 0.0006905 alternative hypothesis: true mu is not equal to 0.5 the way i understand the wilcox.test (or wilcox.exact) the V-value represents the summed up ranks of either the positive or negative differences, whichever sum is BIGGER. to actually look up the p-value in a table (and to quote it in a publication) i need the T value, which to my understanding is the summed up ranks of either the positive or negative differences, whichever sum is SMALLER. so i guess my question is: how do i get the T-value thanks, jan -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Dalgaard BSA
2002-Oct-15 12:13 UTC
[R] V-value in the wilcox.test resp. wilcox.exact
Jan Malte Wiener <jan.wiener at tuebingen.mpg.de> writes:> the way i understand the wilcox.test (or wilcox.exact) the V-value > represents the summed up ranks of either the positive or negative > differences, whichever sum is BIGGER. > > to actually look up the p-value in a table (and to quote it in a > publication) i need the T value, which to my understanding is the > summed up ranks of either the positive or negative differences, > whichever sum is SMALLER. > > so i guess my question is: how do i get the T-valueAt least for wilcox.test, V is the sum of the *positive* ranks. The sum of the negative ranks can be obtained by switching the sign on x and mu. In the absence of ties and exact zeros, the two rank sums add up to sum(1:N) == N*(N+1)/2 If ties are present, standard tables are wrong anyway... -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> hi, > when performing a wilcox.test or a wilcox.exact i get results that looks > like this: > > wilcox.exact(x, mu=.5) > Exact Wilcoxon signed rank test > > data: x > V = 207, p-value = 0.0006905 > alternative hypothesis: true mu is not equal to 0.5 > > > the way i understand the wilcox.test (or wilcox.exact) the V-value > represents the summed up ranks of either the positive or negative > differences, whichever sum is BIGGER.no. wilcox.test computes the statistic along the following lines x <- x - mu ZEROES <- any(x == 0) if(ZEROES) x <- x[x != 0] ... r <- rank(abs(x)) STATISTIC <- sum(r[x > 0]) i.e. the sum of the ranks of the absolute values of x which belong to positive values of x.> > to actually look up the p-value in a table (and to quote it in a > publication) i need the T value, which to my understanding is the summed > up ranks of either the positive or negative differences, whichever sum > is SMALLER. >wilcox.test computes the p-value for you, no need to look up tables. Torsten> so i guess my question is: how do i get the T-value > > thanks, > jan > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._