Hello,

I wish to run a few regressions over the same set of control variables and dependent variables.

Independent Variables : var1 var2 var3

Dependent Variables: var4 var5 var6

I have to run 3 specifications as follows:

Specification 1 : regress var4 var1 var2 var3 (Similarly with var5 and var6 as dependent variables too)

Specification 2: regress var4 var1 var2 (Similarly with var5 and var6 as dependent variables too)

Specification 3: regress var4 var1 var3 (Similarly with var5 and var6 as dependent variables too)

I tried something like this for Specification 1 :

local regressors1 var1 var2 var3

global regressant var4 var5 var6

foreach y of global regressant and foreach x of local regressor1 {

reg `y' `x'

}

I even tried the second foreach within the first one, neither worked.

But it did not work. Can you please tell me how to make two lists (macros) of X and Y variables? Also how to use outreg2 within foreach loop, need to keep appending!

I wish to run a few regressions over the same set of control variables and dependent variables.

Independent Variables : var1 var2 var3

Dependent Variables: var4 var5 var6

I have to run 3 specifications as follows:

Specification 1 : regress var4 var1 var2 var3 (Similarly with var5 and var6 as dependent variables too)

Specification 2: regress var4 var1 var2 (Similarly with var5 and var6 as dependent variables too)

Specification 3: regress var4 var1 var3 (Similarly with var5 and var6 as dependent variables too)

I tried something like this for Specification 1 :

local regressors1 var1 var2 var3

global regressant var4 var5 var6

foreach y of global regressant and foreach x of local regressor1 {

reg `y' `x'

}

I even tried the second foreach within the first one, neither worked.

But it did not work. Can you please tell me how to make two lists (macros) of X and Y variables? Also how to use outreg2 within foreach loop, need to keep appending!

## Comment