Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

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


From   "Lachenbruch, Peter" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: RE: median equality test for non normal variables
Date   Mon, 24 May 2010 08:36:49 -0700

The usual headaches with the t test occur mainly when the distributions are badly skewed and the sample size isn't too large.  One can always do a permutation test.

Tony

Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nick Cox
Sent: Monday, May 24, 2010 7:19 AM
To: [email protected]
Subject: st: RE: median equality test for non normal variables

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 
[email protected] 

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/

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index