Isn't that just the command -cc- ? As in...
cc anyparathesia3 study_control
(Having ensured the variables are suitably encoded first)
David
[email protected]
-----Original Message-----
From: Jonathan Myles [mailto:[email protected]]
Sent: 04 September 2004 16:48
To: [email protected]
Subject: st: odds ratios from tables
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 [email protected]
*
* 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/