Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: foreach question


From   Partha Deb <[email protected]>
To   [email protected]
Subject   Re: st: foreach question
Date   Tue, 17 Feb 2009 17:13:17 -0500

foreach x of local all_surveys
will solve your problem



Rike wrote:
Hi everyone,

can someone please tell me what's wrong with the code below? Thanks in advance.

local all_surveys survey1 survey2 survey3

foreach x of local `all_surveys'   {
 use `x', clear
 reg...
 reg...
 esttab...
eststo clear
}
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

--
Partha Deb
Department of Economics
Hunter College
ph:  (212) 772-5435
fax: (212) 772-5398
http://urban.hunter.cuny.edu/~deb/

Emancipate yourselves from mental slavery
None but ourselves can free our minds.
	- Bob Marley


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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