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

max(chiprob(`Grp'[_N]-1,`K'+(1e-20)),.0001);

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-----
From: [email protected]
[mailto:[email protected]]On Behalf Of BBS
Querschnittsprojekt: Gerhard Sch�n
Sent: Wednesday, 1 June 2005 3:57 PM
To: [email protected]
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-
values.

. 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?

Thanks,
Gerhard

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

*
* 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/
--------------------------------------------------------
Nicholas Winter 607.255.8819 t
Assistant Professor 607.255.4530 f
Department of Government [email protected] e
308 White Hall falcon.arts.cornell.edu/nw53 w
Cornell University
Ithaca, NY 14853-4601

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