Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: ranksum v median - why do they produce different results?


From   Daniel Pratt <daniel_l_pratt@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: ranksum v median - why do they produce different results?
Date   Tue, 2 Aug 2005 11:41:18 +0100 (BST)

Hi,

Using STATA 8 for Windows.

I'm trying to test if older prisoners are committing
suicide sooner after release from prison than younger
prisoners.

I have 2 variables;
daysaftr: no. of days between release and suicide
agedis40: age at time of release from prison

I have used the Wilcoxon rank-sum test, as follows:

ranksum daysaftr, by (agedis40)

which produces: z=1.842, Prob>|z|=0.0655

But when I use the median test, as follows:

median daysaftr, by (agedis40) exact

this produces: Pearson chi2(1)=1.5380, Pr=0.215


I was expecting these two tests to produce the same
results.  Why do they differ?  Are they not the same
test?

Many thanks,

Daniel.

Centre for Suicide Prevention
The University of Manchester
Room A3.5, Humanities Building
Devas Street
Manchester
M13 9PL
Tel:  0161 275 0722
Fax:  0161 275 0716



___________________________________________________________
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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