Announcement

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

  • Year and industry dummy

    Hi, I want to run a fixed effect regression model with both year and industry fixed effect.

    I would like to know if I am doing it correctly.


    Code:
     xtreg mtd prof size tang growth liq dc1 dc2 dc3 dc4 i.year, fe
    
    Fixed-effects (within) regression               Number of obs     =      4,820
    Group variable: induscode                       Number of groups  =         10
    
    R-sq:                                           Obs per group:
         within  = 0.2796                                         min =         80
         between = 0.5962                                         avg =      482.0
         overall = 0.2991                                         max =      1,630
    
                                                    F(18,4792)        =     103.34
    corr(u_i, Xb)  = 0.1301                         Prob > F          =     0.0000
    
    ------------------------------------------------------------------------------
             mtd |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
            prof |  -.3832766   .0236579   -16.20   0.000    -.4296569   -.3368963
            size |   .0361722   .0020567    17.59   0.000     .0321402    .0402042
            tang |   .1248675   .0139474     8.95   0.000     .0975241    .1522108
          growth |  -.0083867   .0007413   -11.31   0.000    -.0098399   -.0069335
             liq |  -.0102962   .0004226   -24.37   0.000    -.0111247   -.0094678
             dc1 |   .0615475   .0095531     6.44   0.000     .0428191     .080276
             dc2 |   .0420181   .0074701     5.62   0.000     .0273732     .056663
             dc3 |   .0213741   .0079806     2.68   0.007     .0057284    .0370199
             dc4 |   .0781161   .0110077     7.10   0.000      .056536    .0996963
                 |
            year |
           2009  |  -.0585273   .0120194    -4.87   0.000    -.0820909   -.0349637
           2010  |  -.0834637   .0120274    -6.94   0.000     -.107043   -.0598844
           2011  |  -.0741264   .0120149    -6.17   0.000    -.0976812   -.0505716
           2012  |  -.0744085   .0120271    -6.19   0.000    -.0979871   -.0508299
           2013  |  -.1149802    .012032    -9.56   0.000    -.1385683    -.091392
           2014  |  -.1233646   .0120518   -10.24   0.000    -.1469917   -.0997376
           2015  |  -.1275209   .0120579   -10.58   0.000    -.1511599    -.103882
           2016  |  -.1244362   .0120844   -10.30   0.000    -.1481271   -.1007453
           2017  |   -.132976   .0121247   -10.97   0.000    -.1567459   -.1092061
                 |
           _cons |   .0220694   .0284766     0.78   0.438    -.0337578    .0778966
    -------------+----------------------------------------------------------------
         sigma_u |  .07936114
         sigma_e |  .18634853
             rho |  .15352465   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    F test that all u_i=0: F(9, 4792) = 46.85                    Prob > F = 0.0000
    Last edited by Larissa MM; 25 Feb 2019, 01:27.

  • #2
    Melissa:
    technically speaking, you simply included a time categorical predictor in the right-hand side of your -fe- regression model.
    This predictor will show, when adjusted for the remaining predictors, variation of the regressand within the same panel as time goes by.
    This might be exactly what you want.
    Conversely, if you want a double fixed effects model, you shoud consider the user-written command -reghdfe- (type -search reghdfe- to spot and install it).
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      However, I strongly suspect that your model is identical to to what you will get from reghdfe. Regression with dummies for panel generally gives identical results to xtreg,fe.

      I ran
      use http://www.stata-press.com/data/r15/nlswork, clear
      xtreg ln_wage grade age ttl_exp i.year ,fe
      reghdfe ln_wage grade age ttl_exp ,absorb(year idcode)

      The parameters on age and tt1_exp are identical in the two estimates. The only difference is that while xtreg drops grade because it is colinear, reghdfe estimates a parameter on grade but with an enormous (e+07) standard error.

      Comment

      Working...
      X