-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:[email protected]]
Sent: 01 June 2005 08:57
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/