Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: median equality test for non normal variables |

Date |
Mon, 24 May 2010 15:18:59 +0100 |

The sign test does not assume normality. Please tell me which text this comes from so that I know to shun it. In my view the best way to compare two distributions is to draw a graph, say -qqplot-. Otherwise if you insist on some kind of P-value, I'd head straight for -somersd- by Roger Newson (-findit- for locations). In a strong sense it subsumes and goes beyond the Wilcoxon-Mann-Whitney machinery of the 1940s. Conversely, there's a lot of literature that shows that the t test is more robust than many people think. Of course, that is a function of what many people think. But arm-waving aside, consider this: sysuse auto, clear (1978 Automobile Data) ttest price, by(foreign) Two-sample t test with equal variances ------------------------------------------------------------------------ ------ Group | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] ---------+-------------------------------------------------------------- ------ Domestic | 52 6072.423 429.4911 3097.104 5210.184 6934.662 Foreign | 22 6384.682 558.9942 2621.915 5222.19 7547.174 ---------+-------------------------------------------------------------- ------ combined | 74 6165.257 342.8719 2949.496 5481.914 6848.6 ---------+-------------------------------------------------------------- ------ diff | -312.2587 754.4488 -1816.225 1191.708 ------------------------------------------------------------------------ ------ diff = mean(Domestic) - mean(Foreign) t = -0.4139 Ho: diff = 0 degrees of freedom = 72 Ha: diff < 0 Ha: diff != 0 Ha: diff > 0 Pr(T < t) = 0.3401 Pr(|T| > |t|) = 0.6802 Pr(T > t) = 0.6599 foreach l in "identity" "power 0.5" "log" "power -1" { di "link `l'" _c qui glm price foreign, link(`l') di "{col 20}" %8.3f _b[foreign]/_se[foreign] } link identity 0.414 link power 0.5 0.416 link log 0.418 link power -1 -0.422 The t or z statistic is pretty insensitive to the exact form of the distribution. (The sign on the last link's result is to be expected.) Nick n.j.cox@durham.ac.uk amatoallah ouchen I have two related observations (i.e. two observations per subject) and I want to see if the median on these two non -normally distributed variables differs from one another. so I used the sign test, but I think that this approach is based on normality assumptions. Is there any test that allow to test median equality for non normal data? * * 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/

**Follow-Ups**:**st: RE: RE: median equality test for non normal variables***From:*"Lachenbruch, Peter" <Peter.Lachenbruch@oregonstate.edu>

**References**:**st: median equality test for non normal variables***From:*amatoallah ouchen <at.ouchen@gmail.com>

- Prev by Date:
**st: RE: renaming variables** - Next by Date:
**st: AW: AW: RE: renaming variables** - Previous by thread:
**st: median equality test for non normal variables** - Next by thread:
**st: RE: RE: median equality test for non normal variables** - Index(es):