foreach v of varlist ind1 ind2 ind3 {
tab dep `v'
}
You could also store the varlist in a local macro and reference that.
Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
On Jul 8, 2007, at 2:33 AM, statalist-digest wrote:
SAS generates two-way tables w respect to a single dependent
variable in
this handy way:
tables dep*(ind1 ind2 ind3)
1) Can Stata do the same thing on a single command line instead of
requiring me to specify each table separately?
- tab2 - generates all possible tables, unhandy when you've got a
lot of
independent variables
-tabsum- , -table- , -statsby- , and -tabstat- don't seem to
allow this
either.
*
* 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/