I am running a couple of regressions that I have nested in a `foreach' loop but I want the regressions to appear in one table. The problem I have is the use of the `replace' option as I want to replace the stored table in my working directory each time I run my dofile. If I use the replace option, the end product will be that each succeeding regression column replaced the preceeding one. See my line of code;
Code:
global vars3 x1 x2 x3 x4 x5

foreach var of global vars3 {
**********************************
display `var'
***********************************
reg depvar `var' 
outreg2 using reg_file, excel ct("reg"`var')
}
How do I ensure that each time the dofile runs, the reg_file in my working directory is replace?