[R] effect sizes for Wilcoxon tests

Peter Dalgaard p.dalgaard at biostat.ku.dk
Tue Nov 15 23:07:20 CET 2005


Claus Atzenbeck <claus.atzenbeck at freenet.de> writes:

> 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.
> 
> However, how do I get Z from a Wilcoxon test in R?

Well it's the quantity that is fed to pnorm in the calculation of the
approximate p-value, so how about inverting it using e.g.

qnorm(wilcox.test(....., exact=FALSE, alternative="less")$p.value)
 
if you don't want to pick stats:::wilcox.test.default apart. You might
also throw in correct=FALSE, but I see no objective argument for
doing so or not.

> (BTW, I have to correct myself: SPSS delivers Z. The effect size was
> calculated by the author of one of my books using the above mentioned
> formula.)
> 
> Claus
> 

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list