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

st: odds ratios from tables


From   Jonathan Myles <mylesj@cancer.org.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: odds ratios from tables
Date   Sat, 4 Sep 2004 16:48:02 +0100 (BST)

sorry, I'm sure this must be simple but i can't find it in the manuals
anyway.

Within an ado-file, can I make take the results from the "table" command
and put them into cci automatically ?

that is, if I was working interactively, I could do:


table anyparathesia3 study_control 

----------------------
RECODE of |
parathesi |
a3 (3     |study_contr
parathesi |     ol    
a)        |    C     S
----------+-----------
        0 |   78    86
        1 |   35    29
----------------------

and then I can type

 cci 78 35 86 29
                                                        Proportion
                 |   Exposed   Unexposed  |     Total     Exposed
-----------------+------------------------+----------------------
           Cases |        78          35  |       113      0.6903
        Controls |        86          29  |       115      0.7478
-----------------+------------------------+----------------------
           Total |       164          64  |       228      0.7193
                 |                        |
                 |      Point estimate    |  [95% Conf. Interval]
                 |------------------------+----------------------
      Odds ratio |          .751495       |  .4031051     1.39685  (exact)
 Prev. frac. ex. |          .248505       | -.3968501    .5968949  (exact)
 Prev. frac. pop |         .1858385       |
                 +-----------------------------------------------
                             chi2(1) =     0.94  Pr>chi2 = 0.3335

but is there any command for doing these steps together in an ado-file?

Thanks

Jonathan Myles




Cancer Research UK Department of Epidemiology, Mathematics and Statistics
Wolfson Institute of Preventive Medicine
Charterhouse Square
London
EC1M 6BQ

E jonathan.myles@cancer.org.uk

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