[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: RE: tabodds command with 'if' option
Note that -For- is not a Stata command. The command is -for-. Also,
unless the user has an old version of Stata, no
on-line help is now available for -for-.
For reasons documented elsewhere, -for- is in
essence deprecated. -forval- and -foreach-
should be considered preferable.
> Assuming your data are set up appropriately, try:
> For num 1/5: tabodds case year [fweight=freq] if cat == X
> 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: