Try something like this
foreach ... {
outreg ... `append'
local append "append"
}
i.e. a local macro is set only at the end
of the first loop.
Nick
[email protected]
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Kim Lyngby
> Mikkelsen (KLM)
>
> I wont to use 'outreg' in a 'foreach'-loop, but to do that I
> need 'outreg' to ignore the "append"-option the first time it
> is called, as the output file does not yet exist.
>
> How do I make 'outreg' to do that, or is there another way to
> come around this problem?
*
* 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/