Another example of a difference between median differences and differences between medians is a comparison between 2 exponenrtial distributions. A discussion of this (Newson, 2008) can be found on my website at
http://www.imperial.ac.uk/nhli/r.newson/papers.htm#miscellaneous_documents
I hope this helps.
Roger
References
Newson RB. Hodges-Lehmann median differences between exponential subpopulations. Download from
http://www.imperial.ac.uk/nhli/r.newson/papers.htm#miscellaneous_documents
Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected]
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/
Opinions expressed are those of the author, not of the institution.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ronan Conroy
Sent: 30 January 2009 13:44
To: [email protected]
Subject: Re: st: Wilcoxon Matched-Pairs Signed-ranks Test also for groups?
On 30 Ean 2009, at 01:41, Rico Baumann wrote:
> I have data with a binary variable (0 and 1) that splits my data set
> into two matched groups (one group of original observations and one
> control group), therefore the samples are not independent.
>
> group1 0 varname1 ...
> group2 1 varname1 ...
>
> Since some of the contained variables are not normally distributed I
> ´d like to use a non-parametric test in order to test for the median
> difference of some variables between the two dependent groups.
Careful what you say here! There is a difference between a difference
in medians and a median difference.
Here's a little do-file. You will need to install the relevant user-
written ados.
=============Start==============
*A simple guide to getting confused about testing for differences
between groups
*Using 'nonparametric' statistics
clear
input group value
1 5
1 5
1 5
1 5
1 5
1 5
1 6
1 7
1 8
1 9
1 10
0 1
0 2
0 3
0 4
0 5
0 5
0 5
0 5
0 5
0 5
end
* No difference in medians -
table group, c(median value)
* And qreg reports this
qreg value group
* However, a nonparametric equality of medians test runs close to the
wire
median value, by(group)
* A rank sum test with the -porder- option shows us that the probability
* of a group 0 value being higher than a group 1 value is just 16%
ranksum value, by(group) porder
* And, of course, the median difference isn't zero either
npshift value, by(group)
* And there's a highly significant difference
censlope value group
=============end=====
Ronan Conroy
=================================
[email protected]
Royal College of Surgeons in Ireland
Epidemiology Department,
Beaux Lane House, Dublin 2, Ireland
+353 (0)1 402 2431
+353 (0)87 799 97 95
+353 (0)1 402 2764 (Fax - remember them?)
http://rcsi.academia.edu/RonanConroy
P Before printing, think about the environment
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/