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

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


From   "David Harrison" <david.harrison@icnarc.org>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: save p-values from Kruskal-Wallis-test
Date   Wed, 1 Jun 2005 09:05:23 +0100

-kwallis- returns the chi-squared statistic and degrees of freedom, so you can get the p-value with the -chi2tail()- function:

. disp chi2tail(r(df), r(chi2))
.29801083

Or, if you want the adjustment for ties (irrelevent in this example):

. disp chi2tail(r(df), r(chi2_adj))
.29801083

David

-----Original Message-----
From: BBS Querschnittsprojekt: Gerhard Schön
[mailto:bbs.methode@charite.de]
Sent: 01 June 2005 08:57
To: statalist@hsphsun2.harvard.edu
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/



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