Re: [R] wilcox.test returned estimates

From: Torsten Hothorn <Torsten.Hothorn_at_rzmail.uni-erlangen.de>
Date: Wed 15 Feb 2006 - 22:59:01 EST

On Wed, 15 Feb 2006, pmt1rew@leeds.ac.uk wrote:

> Hi all,
>
> I have being using wilcox.test to test for differences between 2 independent
> samples. I had understood the difference in location to be conventionally the
> difference in the sample medians however this is not the case when implemented
> in R. I have tied ranks and therefore non-exact p-value and confidence
> intervals are calculated due to the normal approximation. But what exactly is
> this normal approximation i.e. how is it involved in estimating the location
> difference?

the reference distribution is not involved in _estimating_ the difference in location. `wilcox.test' implements the Hodges-Lehmann estimator:

from `stats/R/wilcox.test.R'

                 ## Exact confidence interval for the location parameter
                 ## mean(x) - mean(y) in the two-sample case (cf. the
                 ## one-sample case).
                 alpha <- 1 - conf.level
                 diffs <- sort(outer(x, y, "-"))
                 ...
                 ESTIMATE <- median(diffs)
                 names(ESTIMATE) <- "difference in location"

which simply is the median of all pairwise differences.

However, the usual normal approximation to the exact conditional distribution (in case of ties) of the Wilcoxon-Mann-Whitney statistic (see Hajek, Sidak, Sen for example) is involved in computing a confidence interval for the difference in location.

Hope that helps,

Torsten

>
> Further, is it then wrong to refer to the difference in location as the
> difference between the medians? Does anyone have a more appropriate
> description?
>
> Thanks
>
> Rebecca
>
> ______________________________________________
> R-help@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
>
>



R-help@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 Received on Wed Feb 15 23:04:16 2006

This archive was generated by hypermail 2.1.8 : Thu 16 Feb 2006 - 16:09:05 EST