I would like to estimate several linear regressions in which the explanatory set is increasing as follows.
reg y x z1
reg y x z1 z2
reg y x z1 z2 z3
...
reg y x z1 z2 z3.....z50
what I am firstly interested in is in showing that R2 is increasing as the number of variables is higher. So after each regression, I want to save the R2 coefficient
I tried to make a loop but it does not work:
reg y x z1
reg y x z1 z2
reg y x z1 z2 z3
...
reg y x z1 z2 z3.....z50
what I am firstly interested in is in showing that R2 is increasing as the number of variables is higher. So after each regression, I want to save the R2 coefficient
I tried to make a loop but it does not work:
Comment