Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: collapse _all by


From   Caleb Southworth <[email protected]>
To   [email protected]
Subject   st: collapse _all by
Date   Sun, 22 Sep 2002 17:50:58 -0700 (PDT)

I want to collapse a large number of variables by tract, i.e.

. collapse (sum) _all, by(tract)

Naturally, stata complains that tract is included in _all:

tract may not be both target and by()
r(198);

Any clever way around that? Perhaps defining a macro that excludes one
name? I could type it all in, but this procedure has to be repeated for
many datafiles with different varlists (but which include tract).

Cheers.

Caleb

Dr. Caleb Southworth, Ph.D
American Council of Learned Societies Research Fellow 2002-03
Assistant Professor
Department of Sociology
1291 University of Oregon
Eugene OR 97403
Work: (541) 346-5034
Fax:  (541) 346-5026

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index