| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: probability and z-statistic
Deidra wants to retrieve the p-value and Kendall tau-b score from a
tab of two variables.
. tab anxiety depress,all
| DEPRESS
ANXIETY | 1 2 3 | Total
-----------+---------------------------------+----------
1 | 8 1 0 | 9
2 | 14 42 3 | 59
3 | 3 21 11 | 35
4 | 0 1 3 | 4
-----------+---------------------------------+----------
Total | 25 65 17 | 107
Pearson chi2(6) = 46.1892 Pr = 0.000
likelihood-ratio chi2(6) = 40.9054 Pr = 0.000
Cram�r's V = 0.4646
gamma = 0.7778 ASE = 0.087
Kendall's tau-b = 0.4951 ASE = 0.070
. return list
scalars:
r(N) = 107
r(r) = 4
r(c) = 3
r(chi2) = 46.18917309609633
r(p) = 2.71459405298e-08
r(chi2_lr) = 40.90537799483023
r(p_lr) = 3.02263811177e-07
r(CramersV) = .4645828854557538
r(gamma) = .7777777777777778
r(ase_gam) = .087050646901156
r(taub) = .4950723482288552
r(ase_taub) = .0704364215558283
If she wants the p-value of Kendall's tau-b, it can be easily
calculated (if indeed taub is ~N(0,1)) from what is available in the
return list:
. scalar z=r(taub)/r(ase_taub)
. display "z= " z " with p-value " normden(1-z)
z= 7.0286414 with p-value 5.114e-09
Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
*
* 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/