Announcement

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

  • Year fixed effects

    Hi all,

    I am seeking for explanation on year fixed effects, why one would need them as a control in a panel data regression.
    I searched a lot on the internet and besides definitions I cannot get clear why I need them or what they exactly do in the regression model.

    Is it only to control for factors that are constant throughout the different years in the used sample, or is it more?

    Kind regards,
    Theo

  • #2
    Theo:
    under -xtreg,fe- for instance, -i.year- gives the contribution of time (adjusted for the remaining predictors) to explain variation of the regressand within the same panel.
    You can test whether -i.year- is jointky statistical significant via -testparm-:
    Code:
    . use "http://www.stata-press.com/data/r16/nlswork.dta"
    (National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
    
    . xtreg ln_wage age i.year,fe
    
    Fixed-effects (within) regression               Number of obs     =     28,510
    Group variable: idcode                          Number of groups  =      4,710
    
    R-sq:                                           Obs per group:
         within  = 0.1060                                         min =          1
         between = 0.0914                                         avg =        6.1
         overall = 0.0805                                         max =         15
    
                                                    F(15,23785)       =     188.00
    corr(u_i, Xb)  = 0.0467                         Prob > F          =     0.0000
    
    ------------------------------------------------------------------------------
         ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             age |   .0125992   .0102163     1.23   0.217    -.0074253    .0326238
                 |
            year |
             69  |   .0748621   .0159011     4.71   0.000      .043695    .1060292
             70  |   .0478697   .0235673     2.03   0.042     .0016763     .094063
             71  |   .0865577   .0327939     2.64   0.008     .0222795     .150836
             72  |   .0856757   .0424903     2.02   0.044     .0023919    .1689594
             73  |   .0880069    .052344     1.68   0.093    -.0145906    .1906044
             75  |   .0778607   .0720304     1.08   0.280    -.0633235    .2190449
             77  |    .108365   .0922272     1.17   0.240    -.0724063    .2891363
             78  |   .1309518   .1028143     1.27   0.203    -.0705707    .3324743
             80  |   .1142649    .122792     0.93   0.352    -.1264152     .354945
             82  |   .1090451   .1431112     0.76   0.446    -.1714619    .3895522
             83  |   .1211272   .1532018     0.79   0.429    -.1791581    .4214125
             85  |   .1465637   .1736146     0.84   0.399    -.1937321    .4868594
             87  |   .1382642   .1941163     0.71   0.476     -.242216    .5187445
             88  |   .1799741   .2079871     0.87   0.387    -.2276938     .587642
                 |
           _cons |   1.203731   .1952306     6.17   0.000     .8210667    1.586396
    -------------+----------------------------------------------------------------
         sigma_u |   .4058746
         sigma_e |  .30300411
             rho |  .64212421   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    F test that all u_i=0: F(4709, 23785) = 8.80                 Prob > F = 0.0000
    
    . testparm(i.year)
    
     ( 1)  69.year = 0
     ( 2)  70.year = 0
     ( 3)  71.year = 0
     ( 4)  72.year = 0
     ( 5)  73.year = 0
     ( 6)  75.year = 0
     ( 7)  77.year = 0
     ( 8)  78.year = 0
     ( 9)  80.year = 0
     (10)  82.year = 0
     (11)  83.year = 0
     (12)  85.year = 0
     (13)  87.year = 0
     (14)  88.year = 0
    
           F( 14, 23785) =    6.50
                Prob > F =    0.0000
    
    .
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Hi Carlo,

      Thanks for this!

      So do I include year fixed effects in the model to control for factors that are attributable to the years (and not to the relationship between x and y that I want to test)?
      I cannot get it clear for me (in basic language) what year fixed effects control for and what they do or why I need them...

      Comment


      • #4
        Theo:
        the main issue is checking whether or not time elapses with any effect on the regressand (within the same panel under the -fe- specification).
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #5
          Hi Carlo,

          So if I understand it correctly, by including the year fixed effects in the equation (xtreg dep. var ind. var cv1 cv2 cv3 i.fyear, fe) you control for the effects of the years on the relationship between x and y?

          Comment


          • #6
            Yes.
            Kind regards,
            Carlo
            (Stata 18.0 SE)

            Comment

            Working...
            X