Dear all,

I would like to run several regressions, looping through different dependent variables and outputting all models to an xls file with outreg2.

There are 10 different dependent variables: x1 x2 x3 x4 x5 x6 x7 x8 x9 x10
A fixed set of independent variables: y1 y2 y3
A fixed set of control variables: age i.industry i.year (note: industry and year are to be incorporated as dummies)

The aim is to generate 10 different models (one for each DV) with the same set of IVs and controls, and output them to one xls with outreg2 (append to each other in the same tab).

I have tried to adjust the solution suggested in this previous thread for a similar topic to my problem: https://www.statalist.org/forums/for...on-with-output

However I have seem to have gotten something wrong - would very much appreciate if you could take a look:

Code:
* list dependent variables
local dvs x1 x2 x3 x4 x5 x6 x7 x8 x9 x10

* list independent variables
local ivs y1 y2 y3

* list control variables
local cvs age i.industry i.year

foreach DV of varlist dvs {
     logit `DV' `ivs' `cvs', cluster(id)
     outreg2 using "test.xls", append excel dec(3) addtext (Year dummies, Yes, Industry dummies, Yes) addstat(Pseudo R-squared, `e(r2_p)') drop (i.year i.industry o.*)

   }

variable dvs not found
r(111);

With regards to the output table in xls, I have to further questions:

1) Omitting year / industry dummies: is it possible to omit all industry and year dummies?
I have added "drop..." as an option (see code above), however some year/industry dummies remain in the output as they commence with a different letter, e.g. "12o.industry" instead of "o.industry"

2) Further fitstats: So far, the output includes the Pseudo R2. I was wondering if it is possible to also add the Log Likihood, Chi2 and further R2 measures (e.g., Cragg-Uhler (Nagelkerke) R2; McKelvey & Zavoina's R2) to the outreg2 output?

Many thanks again for your help!