[R] V-value in the wilcox.test resp. wilcox.exact

Torsten Hothorn Torsten.Hothorn at rzmail.uni-erlangen.de
Tue Oct 15 16:24:25 CEST 2002


> 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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list