Statalist The Stata Listserver


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

st: RE: tabodds command with 'if' option


From   "Visintainer, Paul" <[email protected]>
To   <[email protected]>
Subject   st: RE: tabodds command with 'if' option
Date   Fri, 3 Mar 2006 09:30:46 -0500

Assuming your data are set up appropriately, try:

For num 1/5: tabodds case year [fweight=freq] if cat == X

-p

______________________________
Paul F. Visintainer, PhD
Professor and Chairman 
Department of Epidemiology and Biostatistics
School of Public Health
New York Medical College 
Valhalla, NY  10595
PH: (914) 594-4804
FX: (914) 594-4853

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Sean Shu
Sent: Thursday, March 02, 2006 2:21 PM
To: [email protected]
Subject: st: tabodds command with 'if' option

Hi there,

I have a cross-sectional time series dataset. I want to find whether any

trend is presented over the years for different categories. So I used 
tabodds command. But I want to apply the command for different category 
seperately. so I write the command syntax over the dataset attached:

 > tabodds case year [fweight=freq][if cat = 1]
 > tabodds case year [fweight=freq][if cat = 2]
...
 > tabodds case year [fweight=freq][if cat = 5]

Can you tell what's wrong with it? and Do I need write syntax to loop 
the tabodds five time?

Thank you very much!

Sean Shu
HKPR District Public Health Unit
Ontario, Canada

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