Q 1: sir my main objective is to get the value of b_x for 5-year rolling window, firm and year specific or year and industry-specific.
Code:
rangestat (reg) y x, interval(year -4 0) by(industry) rename b_x industry_b drop reg_* b_* se_* rangestat (reg) y x, interval(year -4 0) by(firm) rename b_x firm_b rename reg_* b_* se_*
Q2:sir whenever i am running asrol command for rolling window i am using minimum command for years i.e window(year 5) min(5) , and i get the result if there are al least 5 consecutive years data, otherwise giving me missing value, but i am unable to pick that point here in rangestat for this particular case.
Code:
replace b_x = . if reg_nobs < 5
Q3: is the value b_x we get through rangestat is the average of coefficient x for rolling window of 5 years?
Q4:sir i noted here that if reg_nobs=3 then it gives us values, otherwise for reg_nobs=1 or 2 it is missing. actually, i was thinking that i can get results only for those firms who have enough observations(at least 5 years data) otherwise it will give me missing values, but, here they are also giving me result for reg_nobs=3 or reg_nobs=4, although my interval is (t-4 to t).
Q5: can i drop if reg_nobs <5 ? for interval (-4 0), i have just perceived it ,if there are 4 previous years and one current year data then reg_nobs=5 for interval(-4 0).
Comment