Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: probability and z-statistic


From   "Newson, Roger B" <[email protected]>
To   <[email protected]>
Subject   RE: st: probability and z-statistic
Date   Tue, 5 Dec 2006 17:10:12 -0000

A possible measure of ordinal trend is Somers' D, given (with confidence limits) by the -somersd- package, which you can download from SSC. For instance, if Deidra types

somersd autism_dx kerr_breath_score, tr(z) tdist

then -somersd- will produce a CI for Somers' D of breath score with respect to autism, which is the difference between two probabilities, namely the probabiliry that a randomly-chosen autistic person has a higher breath score than a randomly-chosen non-autistic person and the probability that a randomly-chosen nonautistic person has a higher breath score than a randomly-chosen autistic person.

More about Somers' D and -somersd- can be downloaded from my website (see my signature below).

I hope this helps.

Best wishes

Roger


Roger Newson
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected] 
www.imperial.ac.uk/nhli/r.newson/

Opinions expressed are those of the author, not of the institution.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ron�n Conroy
Sent: 05 December 2006 13:13
To: [email protected]
Subject: Re: st: probability and z-statistic

On 5 Noll 2006, at 13:59, Deidra Young wrote:

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



The test for an ordered association is probably more in line with  
your hypothesis.


. binreg Autism breathscore, rr

Iteration 1:   deviance =  400.4562
Iteration 2:   deviance =  300.4687
Iteration 3:   deviance =  291.5691
Iteration 4:   deviance =  291.3885
Iteration 5:   deviance =  291.3884
Iteration 6:   deviance =  291.3884

Generalized linear models                          No. of obs       
=       315
Optimization     : MQL Fisher scoring              Residual df      
=       313
                    (IRLS EIM)                      Scale parameter  
=         1
Deviance         =  291.3884049                    (1/df) Deviance  
=  .9309534
Pearson          =  314.8318309                    (1/df) Pearson  =   
1.005852

Variance function: V(u) = u*(1-u)                  [Bernoulli]
Link function    : g(u) = ln(u)                    [Log]

                                                    BIC             =  
-1509.167

------------------------------------------------------------------------ 
------
              |                 EIM
       Autism | Risk Ratio   Std. Err.      z    P>|z|     [95% Conf.  
Interval]
------------- 
+----------------------------------------------------------------
breathscore |   1.103058   .1807885     0.60   0.550     .7999973     
1.520926
------------------------------------------------------------------------ 
------

The risk of autism goes up modestly for each 1-unit increase in  
breath score severity, and it's not significant.

You can, of course, just to a trend test

. jonter breath, by(Aut)
Jonckheere-Terpstra Test

        J  = 7498
        J* = 0.57
Prob > J* = 0.28532


or


. nptrend breath, by(Aut)

     Autism     score       obs      sum of ranks
          0         0       260         40732
          1         1        55          9038

           z  =  0.61
   Prob > |z| = 0.544



=========
Ron�n Conroy
Royal College of Surgeons in Ireland
[email protected]
+353 (0) 1 402 2431
+353 (0) 87 799 97 95
http://www.flickr.com/photos/ronanconroy




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



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