wilcox.test returned estimates

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

wilcox.test returned estimates

pmt1rew
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?

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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: wilcox.test returned estimates

Torsten Hothorn

On Wed, 15 Feb 2006, [hidden email] 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
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: wilcox.test returned estimates

Thomas Lumley
In reply to this post by pmt1rew
On Wed, 15 Feb 2006, [hidden email] 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?

It isn't.  The only assumption is that the distribution is the same apart
from location in the two groups.

> 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?

Well, this gets more complicated.  Since the method assumes that the
population distributions differ only by location the population difference
in medians is the same as the difference in means or in 16.34th
percentile, or 42%-trimmed mean or whatever. If the assumption is not true
then seriously weird things can happen (consider the distributions given
by http://mathworld.wolfram.com/EfronsDice.html)

However, the estimate is not the difference in sample medians. It is the
median pairwise difference.


  -thomas

Thomas Lumley Assoc. Professor, Biostatistics
[hidden email] University of Washington, Seattle

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: wilcox.test returned estimates

Gregory Snow
In reply to this post by pmt1rew

If you really want to look at the difference between 2 medians, then consider using permutation tests and bootstrapping for the interval.

-----Original Message-----
From: [hidden email] on behalf of [hidden email]
Sent: Wed 2/15/2006 4:36 AM
To: [hidden email]
Subject: [R] wilcox.test returned estimates
 
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?

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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: wilcox.test returned estimates

Peter Dalgaard
"Gregory Snow" <[hidden email]> writes:

> If you really want to look at the difference between 2 medians, then
> consider using permutation tests and bootstrapping for the interval.

Also notice that contrary to popular belief, distributions with
identical medians can be significantly different. Simplest example is
performance scales where one group scores full marks in 90%  of the
cases and another group scores full marks in 60% of the cases.
 

> -----Original Message-----
> From: [hidden email] on behalf of [hidden email]
> Sent: Wed 2/15/2006 4:36 AM
> To: [hidden email]
> Subject: [R] wilcox.test returned estimates
>  
> 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?
>
> 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
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

--
   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
~~~~~~~~~~ - ([hidden email])                  FAX: (+45) 35327907

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html