BDupont
>
> Is there a way to combine a "by" statement or its
> equivalent with the svytab
> command? For instance, I have a file with multiple years
> and want to
> breakdown the svytab results by year. Using the simple
> "tabulate" command
> allows me to do this using by year: tabulate <varlist>. The
> svytab command
> does not but I'm wondering if there is another way to do this?
Try -levels-.
levels year, local(Y)
foreach y of local Y {
svytab onevar othervar if year == `y'
}
In addition, see the FAQ
Is there a way to tell Stata to try all values
of a particular variable in a foreach statement
without specifying them?
http://www.stata.com/support/faqs/data/foreach.html
Nick
[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/