Dear all,
I am trying to combine statsby with a rolling window regression. Unfortunately, I didn't figure out a feasible command. I tried the following:
My data looks as following:
I am happy about any help.
Best,
Alex
I am trying to combine statsby with a rolling window regression. Unfortunately, I didn't figure out a feasible command. I tried the following:
Code:
statsby _b, by(Ind) clear: reg eret IP MktRF HML SMB, wind(date_adj 72)
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float date_adj str6 Ind float IP double(MktRF SMB HML) float eret 24 "_Aero" -.8879781 -3.87 1.86 4.98 6.78 24 "_Agric" -.8879781 -3.87 1.86 4.98 -3.66 24 "_Autos" -.8879781 -3.87 1.86 4.98 -1.27 24 "_Banks" -.8879781 -3.87 1.86 4.98 -6.16 24 "_Beer" -.8879781 -3.87 1.86 4.98 -3.45 24 "_BldMt" -.8879781 -3.87 1.86 4.98 -5.71 24 "_Books" -.8879781 -3.87 1.86 4.98 -3.81 24 "_Boxes" -.8879781 -3.87 1.86 4.98 -5.38 24 "_BusSv" -.8879781 -3.87 1.86 4.98 -1.45 24 "_Chems" -.8879781 -3.87 1.86 4.98 -4.76 24 "_Chips" -.8879781 -3.87 1.86 4.98 -4.53 24 "_Clths" -.8879781 -3.87 1.86 4.98 -5.89 24 "_Cnstr" -.8879781 -3.87 1.86 4.98 -1.32 24 "_Coal" -.8879781 -3.87 1.86 4.98 4.67 end format %tm date_adj
Best,
Alex
Comment