Announcement

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

  • Time trend and time fixed effects in panel

    Dear community,

    I want to include a general time trend (by a year dummy) together with time fixed effects (for the individual years) in my fixed effects model. However, I see that adding "year" to a model with year fixed effects holds all coefficients and their standard errors exactly constant but only changes the magnitude of the constant by a lot. Is it a bad idea to combine year and year fixed effects? I have though about it a lot but I don't find any reason why all coefficients should stay exactly unchanged when adding year...

    I appreciate any help!

  • #2
    Noemi:
    without an example (see -dataex-) from your side (as recommended by the FAQ) it is difficult (for me at least) to reply more positively.
    Do you mean something along the following lines?
    Code:
    . use "https://www.stata-press.com/data/r18/nlswork.dta"
    (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
    
    . xtreg ln_wage c.year##c.year i.year c.age##c.age, fe vce(cluster idcode)
    note: c.year#c.year omitted because of collinearity.
    note: 88.year omitted because of collinearity.
    
    Fixed-effects (within) regression               Number of obs     =     28,510
    Group variable: idcode                          Number of groups  =      4,710
    
    R-squared:                                      Obs per group:
         Within  = 0.1162                                         min =          1
         Between = 0.1078                                         avg =        6.1
         Overall = 0.0932                                         max =         15
    
                                                    F(16, 4709)       =      79.11
    corr(u_i, Xb) = 0.0613                          Prob > F          =     0.0000
    
                                  (Std. err. adjusted for 4,710 clusters in idcode)
    -------------------------------------------------------------------------------
                  |               Robust
          ln_wage | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
    --------------+----------------------------------------------------------------
             year |   .0095249   .0124304     0.77   0.444    -.0148445    .0338943
                  |
    c.year#c.year |          0  (omitted)
                  |
             year |
              69  |   .0551805     .01019     5.42   0.000     .0352033    .0751578
              70  |   .0093925   .0102917     0.91   0.361    -.0107841     .029569
              71  |   .0294213   .0108932     2.70   0.007     .0080655     .050777
              72  |   .0129676   .0118374     1.10   0.273    -.0102393    .0361744
              73  |   -.005214   .0121865    -0.43   0.669    -.0291052    .0186772
              75  |  -.0515366   .0129534    -3.98   0.000    -.0769313   -.0261419
              77  |  -.0516307   .0137305    -3.76   0.000     -.078549   -.0247125
              78  |  -.0415155   .0142592    -2.91   0.004    -.0694702   -.0135607
              80  |  -.0773511   .0142914    -5.41   0.000    -.1053688   -.0493333
              82  |  -.0941797   .0136619    -6.89   0.000    -.1209633    -.067396
              83  |  -.0841072   .0134669    -6.25   0.000    -.1105087   -.0577058
              85  |  -.0576473   .0116432    -4.95   0.000    -.0804734   -.0348211
              87  |  -.0567457   .0103657    -5.47   0.000    -.0770672   -.0364241
              88  |          0  (omitted)
                  |
              age |   .0728746    .013687     5.32   0.000     .0460416    .0997075
                  |
      c.age#c.age |  -.0010113   .0001076    -9.40   0.000    -.0012224   -.0008003
                  |
            _cons |   -.253939    .620325    -0.41   0.682    -1.470066    .9621882
    --------------+----------------------------------------------------------------
          sigma_u |  .40275174
          sigma_e |  .30127563
              rho |  .64120306   (fraction of variance due to u_i)
    -------------------------------------------------------------------------------
    
    .
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Dear Carlo, thank you for your response and the data example. This is exactly what I mean. In my data, when I now add further variables to the model as controls, the coefficient of age would stay exactly the same (also its standard error) which is hardly imaginable for me. Only the value of the constant would change by a lot. If I do not include the year variable alongside the time fixed effects, the coefficient of age would change when adding further controls. So it should have to do something with including year alongside time fixed effects but I don't get why this is the case.

      Comment


      • #4
        Noemi:
        it is difficult to reply helpfully without taking a look at your data and your codes, along with what Stata gave you back (as per FAQ). Thanks.
        With a bit of guess-work, what you're experiencing may be due to the fact that the -fe- estimator wipes out time-invariant variables.
        If your controls have not within-panel variation, they will be ruled out from the -fe- regression.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment

        Working...
        X