Statalist The Stata Listserver


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

st: -outreg- in a loop


From   Nishant Dass <nishant_dass@yahoo.com>
To   STATA Help <statalist@hsphsun2.harvard.edu>
Subject   st: -outreg- in a loop
Date   Mon, 18 Sep 2006 04:27:37 -0700 (PDT)

Dear list-members,

I am trying to create tables using the following loop:

foreach X in x y z {
      reg a `X'
      outreg a `X' using "D:\`X'.txt", replace
}

I.e., I would like to utilize the macro-variable to name my
output file as well but somehow this doesn't work.  Does
anyone have a suggestion?  It would be helpful if you can
share it.

Thank you very much.

Nishant

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
*
*   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