I am working on stata to run multiple regressions, I would like to write a loop to achieve this goal.
My case is there are 10 dependent variables is v1....v10, variable of interest is T, 10 control variables(X: x1....x10) and further 7 control variables (v1_, ..... v7_) which will go differently to each regression.
For example v1_ will go with regression where dependent variables is v1, likewise.
what I want to do is run 10 regressions by adding control variable one at a time.
reg v1 T v1_ X ,
reg v2 T v2_ X
reg v3 T v3_ X
.
.
.
.
reg v7 T v7_ X
reg v8 T X
reg v9 T X
reg v10 T X
for each regression I need output them into word file using esttab *
Can anyone help me on this ?
Thank you!
My case is there are 10 dependent variables is v1....v10, variable of interest is T, 10 control variables(X: x1....x10) and further 7 control variables (v1_, ..... v7_) which will go differently to each regression.
For example v1_ will go with regression where dependent variables is v1, likewise.
what I want to do is run 10 regressions by adding control variable one at a time.
reg v1 T v1_ X ,
reg v2 T v2_ X
reg v3 T v3_ X
.
.
.
.
reg v7 T v7_ X
reg v8 T X
reg v9 T X
reg v10 T X
for each regression I need output them into word file using esttab *
Can anyone help me on this ?
Thank you!
Comment