Thursday, March 02, 2006

st: RE: tabodds command with 'if' option

First, please don't send attachments to Statalist. This is explained in the FAQ which you should read thoroughly before your next posting to Statalist.

Second, I don't know why you put

... [if cat = 1]

but the brackets make this illegal and in Stata testing for equality requires == not =. Try

tabodds case year [fweight=freq] if case == 1

Third, you can loop

forval i = 1/5 { tabodds case year [fweight = freq] if case == `i' }

Finally, -if- is not an option. It is (here) a qualifier.


Sean Shu > 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?

* * For searches and help try: * * *


Links to this post:

Create a Link

<< Home

This page is powered by Blogger. Isn't yours?