Statalist The Stata Listserver

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

st: -outreg- in a loop

From   Nishant Dass <[email protected]>
To   STATA Help <[email protected]>
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.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index