Hi,
I want to add multiple independent variables in regressions gradually with same dependent variable and previous independent variables.
Instead of writing regressions separately, is there any smarter way to do that, like, use a loop?
For example, the stupidest way is
webuse auto.dta, clear
reg price mpg
est store m1
reg price mpg rep78
est store m2
reg price mpg rep78 headroom
est store m3
reg price mpg rep78 headroom trunk
est store m4
reg price mpg rep78 headroom trunk weight
est store m5
I want to add multiple independent variables in regressions gradually with same dependent variable and previous independent variables.
Instead of writing regressions separately, is there any smarter way to do that, like, use a loop?
For example, the stupidest way is
webuse auto.dta, clear
reg price mpg
est store m1
reg price mpg rep78
est store m2
reg price mpg rep78 headroom
est store m3
reg price mpg rep78 headroom trunk
est store m4
reg price mpg rep78 headroom trunk weight
est store m5
Comment