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

Re: st: Re: interpretation


From   Judith Abrams <[email protected]>
To   [email protected]
Subject   Re: st: Re: interpretation
Date   Wed, 11 Jun 2003 11:53:55 -0400

I believe there is an error in kwallis2. I wrote to the author and he disagreed. The reason for my concern is the null case. According to my understanding, if there are only 2 groups, kwallis and kwallis2 should produce the same pvalues, but they do not. For example, using the auto data

kwallis trunk, by(foreign)

Test: Equality of populations (Kruskal-Wallis test)

+---------------------------+
| foreign | Obs | Rank Sum |
|----------+-----+----------|
| Domestic | 52 | 2218.00 |
| Foreign | 22 | 557.00 |
+---------------------------+

chi-squared = 10.045 with 1 d.f.
probability = 0.0015

chi-squared with ties = 10.134 with 1 d.f.
probability = 0.0015

**
kwallis2 trunk, by(foreign)

One-way analysis of variance by ranks (Kruskal-Wallis Test)

foreign Obs RankSum RankMean
--------------------------------
0 52 2218.00 42.65
1 22 557.00 25.32

Chi-squared (uncorrected for ties) = 10.045 with 1 d.f. (p = 0.00153)
Chi-squared (corrected for ties) = 10.134 with 1 d.f. (p = 0.00146)

Multiple comparisons between groups
-----------------------------------
(Adjusted p-value for significance is 0.025000)

Ho: trunk(foreign==1) = trunk(foreign==2)
RankMeans difference = 17.34 Critical value = 10.72
Prob = 0.000764 (S)


--

Judith Abrams
Barbara Ann Karmanos Cancer Institute
Wayne State University


*
* 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index