Kit's suggestion was identical to mine.
This looks correctly calculated assuming that
your z genuinely does relate to N(0,1).
In this example, the question of significance is
at best cosmetic. Even if a much bigger sample size
led to this being declared significant, a rank
correlation of 0.03 is still clear-cut!
Nick
[email protected]
Deidra Young
> I just tried Kit's suggestion. One variable has two
> categories and the
> other has three. My test is to determine if there is a
> difference between
> cases with and without Autism Diagnosis (2) using an ordered severity
> measure with three levels (none, mild or severe). Using your
> suggestion, I
> obtained the following result. Does this look like the p value is
> calculated correctly?
> . tab autism_dx kerr_breath_score, all
>
> | Kerr Score for Disturbed Awake
> Initially Diagnosed | Breathing Rhythm
> with Autism | None Mild Severe | Total
> --------------------+---------------------------------+----------
> No Autism Diagnosis | 75 109 76 | 260
> Autism Diagnosis | 11 29 15 | 55
> --------------------+---------------------------------+----------
> Total | 86 138 91 | 315
>
> Pearson chi2(2) = 2.5711 Pr = 0.277
> likelihood-ratio chi2(2) = 2.6204 Pr = 0.270
> Cram�r's V = 0.0903
> gamma = 0.0759 ASE = 0.116
> Kendall's tau-b = 0.0324 ASE = 0.050
>
> . ret li
>
> scalars:
> r(N) = 315
> r(r) = 2
> r(c) = 3
> r(chi2) = 2.571055140705914
> r(p) = .2765046694792958
> r(chi2_lr) = 2.620364965212246
> r(p_lr) = .2697708234098308
> r(CramersV) = .0903442295432575
> r(gamma) = .0758665794637018
> r(ase_gam) = .1163419665428843
> r(taub) = .0324087958656579
> r(ase_taub) = .0497834038046439
>
> . di r(taub) / r(ase_taub)
> .65099598
>
> . scalar z=r(taub)/r(ase_taub)
>
> . display "z= " z " with p-value " normden(1-z)
> z= .65099598 with p-value .37537099
>
>
>
>
>
>
>
>
> On 5/12/06 8:22 PM, "Kit Baum" <[email protected]>
>
> > 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
*
* 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/