Announcement

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

  • Mean of firm fixed effects in a rolling regression routine?

    Hi
    I am running an expanding window-rolling regression to estimate the firm fixed effects and a fitted value that exclude fixed effects using a code proposed by Clyde Schechter here http://www.statalist.org/forums/foru...m-fixed-effect
    The objective is to attach the estimated fixed effects (which should be the same in a given panel) and the fitted value to the last observation in each panel. As the panel proceeds, the fixed effects and fitted values are re-estimated and attached to the last observation in the panel, and so on.

    The code I use is:
    Code:
    gen FIRM=.
    gen FIT=.
    
    summ fqdate
    local first = r(min)+ 8
    local last = r(max)
    forvalues p = `first'/`last' {
        capture noisily xtreg Tbtm L(0/6).TdMV i.fqdate if inrange(fqdate, `p'-8, `p'), fe
       if c(rc) == 0 {
            predict firm_effect, u
            replace FIT= _b[TdMV]*TdMV + _b[L.TdMV]*L1.TdMV + _b[L2.TdMV]*L2.TdMV + _b[L3.TdMV]*L3.TdMV + _b[L4.TdMV]*L4.TdMV + _b[L5.TdMV]*L5.TdMV + _b[L6.TdMV]*L6.TdMV ///
             if fqdate == `p'
            replace FIRM = firm_effect if fqdate == `p'
            drop firm_effect
       }
      else if c(rc) == 2001 { // INSUFFICIENT OBSERVATIONS
     display as error "Insufficient Observations for Analysis in " %tq =`p'
        }
        
        else {    // OTHER UNANTICIPATED ERROR
            display as error "Unexpected Error Encountered Analyzing" %tq =`p'
            exit `c(rc)'
        }
    }

    The code works properly and produced what it intends to produce.

    My question is :
    If I aggregate all estimated firm fixed effects (BY EACH QUARTER period) , should I expect that each aggregate in any given quarter to be zero by construction?
    In other words, I think that the mean of all fixed effects might be zero, but should the mean (i.e. the equally weighted aggregate) by each quarter period be also zero. Note that my expanding window rolling regression estimates those fixed effects for each panel and attach them to the last observation in the panel?

    Thank you so much in advance
    Last edited by Mike Kraft; 29 Sep 2016, 08:45.

  • #2
    In other words to clarify:
    Is there any theoretical argument that firm fixed effects should have a zero mean by construction? also in my analysis, I find that the the mean of fixed effects per each quarter is not equal to zero, but the mean for the entire sample is near zero. Is this due to having unbalanced data where the firms could be different from a quarter to another or simply because there is no argument that necessitates that those means should be zero each quarter?

    I hope someone can give me some guidance

    Comment

    Working...
    X