Dear Stata folks,
I have a question: How can i create a loop which regresses my dependent variable on a set of independent variables which are either in the ordinary or log form in all its possible combinations?
To be more precise: I want to do:
P.S: I know this might sound a bit like hacking, but its more a way to find out if this might justify the usage of some variables as logs (based on adj. R²).
Many thanks in advance
I have a question: How can i create a loop which regresses my dependent variable on a set of independent variables which are either in the ordinary or log form in all its possible combinations?
To be more precise: I want to do:
- reg y x1 x2 x3 x4 x5 x6 x7 -> give me usual regression statistics, as for instance the adj. R²
- reg y log(x1) x2 x3 x4 x5 x6 x7 -> ""
- reg y log(x1) log(x2) x3 x4 x5 x6 x7 -> ""
- ....
- reg y x1 x2 log(x3) x4 x5 x6 log(x7) (that's just one example drawn out of all possible combinations of log/ordinary x.
P.S: I know this might sound a bit like hacking, but its more a way to find out if this might justify the usage of some variables as logs (based on adj. R²).
Many thanks in advance
Comment