Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    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_*
    (Use the actual names of your industry and firm variables.)

    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.
    -rangestat- doesn't have an option like that. As you noted later in the post, you can achieve this after the fact by
    Code:
    replace b_x = . if reg_nobs < 5
    immediately after the -rangestat- command runs.

    Q3: is the value b_x we get through rangestat is the average of coefficient x for rolling window of 5 years?
    I don't understand this question. Each rolling window gives you one regression coefficient; there is nothing to average over.

    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).
    -rangestat- will give you results for any regression that has enough observations to make the regression possible. You do not get results for 1 or 2 observations because in that case there is not enough data to even do a regression. But 3 observations are enough to do a regression, so -rangestat- gives results. If you want results only when there are 5 or more, you can remove the unwanted results after, as noted in response to your Q2.

    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).
    No, you should not -drop- as you will omit the observation entirely from your data set, where you may need it later. For example, for an firm specific window there might be fewer than 5 observations, but the same five year window for industry might contain more--if you -drop- the observation after the firm regression, it will not be there for the industry regression and you will both lose data and also bias any other regressions that should contain that observation. See the response to Q2 for what you should do: replace the coefficient with missing value.

    Comment


    • #17
      @Clyde Schechter sir i don't have proper words to express my thanks for your unbelievable cooperation and help, sir I can salute to your kindness and guidance, i am very thankful to you sir.Although i have spent one month on this calculation, but today i got the answers to my all questions.
      Thank you once again sir. Best regards.

      Comment

      Working...
      X