Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: RE: median equality test for non normal variables

From   Ronan Conroy <>
To   "" <>
Subject   Re: st: RE: RE: median equality test for non normal variables
Date   Tue, 25 May 2010 11:06:15 +0100


There is an interesting question concerning the difference between what people think they are doing when applying a 'nonparametric' test and what is actually happening.

Consider the following data:

input var group
1 0
2 0
3 0
4 0
4 0
4 0
4 0
4 1
4 1
4 1
4 1
5 1
6 1
7 1

Note that the median coincides with the highest value in group zero and the lowest value in group 1.

What we get now depends critically on what we ask for:

Test for equality of medians using -qreg- : P=1.000 (the medians are the same)
Wilcoxon rank sum test : Prob > |z| =   0.0196
Median test (which does not test for equality of medians, NB) : Pearson chi2(1) = 3.8182 Pr = 0.051 Median test, continuity corrected : Pearson chi2(1) = 1.6970 Pr = 0.193
Ordered logit regression with group as a predictor : P =  0.997
'Harrell's C' (as calculated by -somersd-) : .76, P < 0.001

I have put quotes around Harrell's C, as this quantity is simply a rescaling of Mann Whitney's U, dividing it by its maximum possible value, and was first proposed by Richard Herrnstein in 1976 (Herrnstein, R. J., Loveland, D. H., & Cable, C. (1976). Natural concepts in pigeons. Journal of Experimental Psychology: Animal Behavior Processes, 2, 285–302), who termed it rho. Fans of terminological chaos will also recognise the entity as the area under the ROC curve. Harrell's C is identical with rho only when the data are uncensored (James A. Koziol, Zhenyu Jia.T he Concordance Index C and the Mann-Whitney Parameter Pr(X>Y) with Randomly Censored Data Biometrical Journal 2009:51(3);467 - 474.)

I fancy that there is an amusing paper on this, clarifying the hypotheses being tested in each case, if anyone has time to write one...

I am looking again at the t-test, which, after a couple of Kolmogorov- Smirnovs, is beginning to look more and more attractive.

Ronan Conroy
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?)

P    Before printing, think about the environment

*   For searches and help try:

© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index