Statalist


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

Re: st: foreach question


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: foreach question
Date   Tue, 17 Feb 2009 23:16:49 +0100

<>

If the error message does not alert you to the problem, always -set trace on- to see what Stata makes of your input and where it gets stuck...


HTH
Martin
_______________________
----- Original Message ----- From: "Rike" <silvery.enigma@gmail.com>
To: "statalist" <statalist@hsphsun2.harvard.edu>
Sent: Tuesday, February 17, 2009 11:14 PM
Subject: Re: st: foreach question


Oh well, I figured it out.

On 2/17/09, Rike <silvery.enigma@gmail.com> 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/

*
*   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/


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