Dear Statalist members,
I would like to estimate an equation using annual cross-sectional regressions for the period 2010-2015 to obtain coefficients β0 , β1 , β2 , β3 for each year.
To do so, I insert the following commands in STATA 14.2
forvalue y = 2010(1)2015{
display `y'
reg RN D R RTAILLE RMTB REND DR DRTAILLE DRMTB DREND TAILLE MTB END DTAILLE DMTB DEND if `y'== year,
gen beta_0 = _b(DR) if `y'== year,
gen beta_1= _b(DRTAILLE) if `y'== year,
gen beta_2= _b(DRMTB) if `y'== year,
gen beta_3= _b(DREND) if `y'== year,
But it seems that I have an error somewhere. Could you please help me to correct this command that permit to estimate the cross section regression and obtain the coefficients βit.
Best regards
I would like to estimate an equation using annual cross-sectional regressions for the period 2010-2015 to obtain coefficients β0 , β1 , β2 , β3 for each year.
To do so, I insert the following commands in STATA 14.2
forvalue y = 2010(1)2015{
display `y'
reg RN D R RTAILLE RMTB REND DR DRTAILLE DRMTB DREND TAILLE MTB END DTAILLE DMTB DEND if `y'== year,
gen beta_0 = _b(DR) if `y'== year,
gen beta_1= _b(DRTAILLE) if `y'== year,
gen beta_2= _b(DRMTB) if `y'== year,
gen beta_3= _b(DREND) if `y'== year,
But it seems that I have an error somewhere. Could you please help me to correct this command that permit to estimate the cross section regression and obtain the coefficients βit.
Best regards
Comment