Statalist The Stata Listserver


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

Re: st: Risk differences in Epitab


From   "Svend Juul" <[email protected]>
To   <[email protected]>
Subject   Re: st: Risk differences in Epitab
Date   Thu, 9 Feb 2006 10:52:00 +0100

Edward wrote:

I would like to compute a risk difference, instead of the default risk
ratio, using the -cs- command in epitab. However, when I try to run
commands like

gen ones = 1
cs y x, by(a b c) standard(ones) rd

Stata 9.0 returns a error of "invalid sytax" number 198. The same
command without "rd" (meaning the default risk ratio) works fine.
--------------------------------------------

I could reproduce the problem with an updated Stata 9.1.

But you could trick Stata into believing that you have only one
stratification variable:

    . egen abc=group(a b c) , label
    . cs y x , by(abc) standard(ones) rd

Then it works - but the trick ought not be necessary. Another
possibility is to use -binreg-.

Hope this helps.
Svend
__________________________________________

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000  Aarhus C, Denmark
Phone: +45 8942 6090
Home:  +45 8693 7796
Email: [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/



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