Hello,
I could not find resources online for running repeated regressions with many independent variables (which keep increasing). For example, first; I want to run three regressions regressing FP2A with each x of local empowerment, with all of the independent variables (age dummies) listed. The code I have is:
However, in addition to this regression, I want to run three more regressions; FP2A with each x of local empowerment, with the age dummies I have, and then additional independent variables dumm_primary dumm_secondary dumm_bachelors dumm_postbachelors. The code would look like:
I will keep running the same regressions but will be adding more and more independent variables. Is there a way to simplify this process? I've tried running the code below to but it gives me not three but MANY regressions of FP2A against each individual age group.
Here is a data sample
input int FP2A float(dumm_15_19 dumm_20_24 perm1 alone1 decision_mker1)
1 0 0 -.3679239 .56009114 4.98925
1 0 0 -.3679239 .56009114 -.20041974
1 0 0 . . -.20042597
1 0 0 -.3679239 .56009114 -.20042567
1 0 0 -.3679239 .56009114 -.20042536
1 0 0 . . -.20042595
1 0 0 . . -.20042397
1 0 0 -.3679239 .5600887 -.20042236
1 0 0 -.3679239 .56009114 -.2004214
1 0 0 2.717842 .56008655 4.989255
0 0 0 -.3679239 -1.7853688 -.2004269
1 0 0 2.7178476 . -.20042212
I could not find resources online for running repeated regressions with many independent variables (which keep increasing). For example, first; I want to run three regressions regressing FP2A with each x of local empowerment, with all of the independent variables (age dummies) listed. The code I have is:
Code:
local empowerment decision_mker1 perm1 alone1 foreach x of local empowerment{ regress FP2A `x' dumm_20_24 dumm_25_29 dumm_30_34 dumm_35_39 dumm_40_44 dumm_45_49 }
However, in addition to this regression, I want to run three more regressions; FP2A with each x of local empowerment, with the age dummies I have, and then additional independent variables dumm_primary dumm_secondary dumm_bachelors dumm_postbachelors. The code would look like:
Code:
local empowerment decision_mker1 perm1 alone1 foreach x of local empowerment{ regress FP2A `x' dumm_20_24 dumm_25_29 dumm_30_34 dumm_35_39 dumm_40_44 dumm_45_49 dumm_primary dumm_secondary dumm_bachelors dumm_postbachelors, robust }
I will keep running the same regressions but will be adding more and more independent variables. Is there a way to simplify this process? I've tried running the code below to but it gives me not three but MANY regressions of FP2A against each individual age group.
Code:
local empowerment decision_mker1 perm1 alone1 foreach x of local empowerment{ foreach y of local agegroup{ regress FP2A `x' `y' } }
Here is a data sample
input int FP2A float(dumm_15_19 dumm_20_24 perm1 alone1 decision_mker1)
1 0 0 -.3679239 .56009114 4.98925
1 0 0 -.3679239 .56009114 -.20041974
1 0 0 . . -.20042597
1 0 0 -.3679239 .56009114 -.20042567
1 0 0 -.3679239 .56009114 -.20042536
1 0 0 . . -.20042595
1 0 0 . . -.20042397
1 0 0 -.3679239 .5600887 -.20042236
1 0 0 -.3679239 .56009114 -.2004214
1 0 0 2.717842 .56008655 4.989255
0 0 0 -.3679239 -1.7853688 -.2004269
1 0 0 2.7178476 . -.20042212
Comment