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

Re: st: RE: save p-values from Kruskal-Wallis-test

From   Nick Winter <>
Subject   Re: st: RE: save p-values from Kruskal-Wallis-test
Date   Wed, 01 Jun 2005 09:50:22 -0400

I note that the -kwallis- ado file reports a probability of 0.0001 whenever the actual chi2tail value is less than 0.0001, and to add (1e-20) to the value of the statistic before calculating the probability.

The relevant bit of code is:


Presumably it never makes a substantive difference that the p-level is reported as 0.0001 when it is, in fact "less than 0.0001." But this seems odd (at best) to me, and inconsistent with Stata's style of reporting p-levels in other cases. Anyone aware of any reason for this?

--Nick Winter


At 04:44 AM 6/1/2005, you wrote:

return list

shows that the chi2 value and the degrees of freedon are saved in r(df) and r(chi2)

So the p-value is chi2tail(`r(df)',`r(chi2)')

-----Original Message-----
[]On Behalf Of BBS
Querschnittsprojekt: Gerhard Schön
Sent: Wednesday, 1 June 2005 3:57 PM
Subject: st: save p-values from Kruskal-Wallis-test

Dear all,

I have to save p-values from a Kruskal-Wallis-test.
Unfortunately the command kwallis doesn't return p-

. sysuse auto
. kwallis price, by(foreign)
. return list

Is there a way to obtain p-values from Kruskal-Wallis-
test in a (e)return list; maybe within other commands?


* For searches and help try:

* For searches and help try:
Nicholas Winter 607.255.8819 t
Assistant Professor 607.255.4530 f
Department of Government e
308 White Hall w
Cornell University
Ithaca, NY 14853-4601

* For searches and help try:

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