[R] effect sizes for Wilcoxon tests

Torsten Hothorn Torsten.Hothorn at rzmail.uni-erlangen.de
Wed Nov 16 09:13:56 CET 2005



On Tue, 15 Nov 2005, Thomas Lumley wrote:

> On Tue, 15 Nov 2005, Claus Atzenbeck wrote:
>
> > On Tue, 15 Nov 2005, Peter Dalgaard wrote:
> >
> >>>> However, for Wilcoxon tests, the formula for effect sizes is:
> >>>> r = Z / sqrt(N)
> >>>>
> >>>> I wonder how I can calculate the Z-score in R for a Wilcoxon test.
> >>>
> >>> Does anyone know how to calculate effect sizes for Wilcoxon tests as
> >>> SPSS can do? I wonder if it would be very difficult to do so with R.
> >>
> >> If the above formula is correct, it can't be hard. What I wonder is
> >> whether (and if so, how) it makes sense. (& the fact that SPSS does it
> >> is no guarantee...)
> >
> > According to my references, the formula is OK.
> >
>
> I think you have misinterpreted the direction of Peter's scepticism. The
> question is whether an effect size defined this way means anything useful.
> For example, even if your data are Normally distributed with equal
> variance this definition will not agree with the definition based on the
> mean. This is only the start of the potential problems, especially if the
> distributions do not have the same shape.
>
>
> > However, how do I get Z from a Wilcoxon test in R?
>
> wtest <- wilcox.test(y~group,data=d, alternative="greater")
> qnorm(wtest$p.value)
>

or

library("coin")
statistic(wilcox_test(y ~ group, data = d, ...), type = "standardized")

where the variance `estimator' takes care of tied observations.

Best,

Torsten

>
>  	-thomas
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>




More information about the R-help mailing list