Statalist


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

st: Re: twoway tables


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: twoway tables
Date   Sun, 8 Jul 2007 07:39:00 -0400

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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index