Announcement

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

  • Panel Regression With Fixed Time Effects

    Hello Everyone,

    I'm new here and possibly this question has been overly addressed but i can't seem to relate all that I've read previously, to my peculiar issue.
    I am using Stata 14.

    I have panel data for 84 countries over 10 time periods.The Hausman test points to a fixed effects model.
    I want my estimates to include fixed time effects but I get different results when I try two approaches I've read on which I'll paste below.

    My question basically is that which of these two is most appropriate?

    Code:
    xtreg eg ini_lny ln_edu ini_m3 ini_gov ini_trd, fe vce(robust)
    Code:
    Fixed-effects (within) regression               Number of obs     =        732
    Group variable: id                              Number of groups  =         83
    
    R-sq:                                           Obs per group:
         within  = 0.1192                                         min =          1
         between = 0.0621                                         avg =        8.8
         overall = 0.0021                                         max =         10
    
                                                    F(5,82)           =      14.28
    corr(u_i, Xb)  = -0.9509                        Prob > F          =     0.0000
    
                                        (Std. Err. adjusted for 83 clusters in id)
    ------------------------------------------------------------------------------
                 |               Robust
              eg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
         ini_lny |  -.0289996    .004875    -5.95   0.000    -.0386976   -.0193016
          ln_edu |   .0022868   .0028824     0.79   0.430    -.0034472    .0080208
          ini_m3 |   -.000018   .0000606    -0.30   0.767    -.0001386    .0001026
         ini_gov |  -.0012903   .0004423    -2.92   0.005    -.0021702   -.0004104
         ini_trd |   .0003053   .0000844     3.62   0.001     .0001374    .0004733
           _cons |   .2543406   .0341692     7.44   0.000     .1863671    .3223141
    -------------+----------------------------------------------------------------
         sigma_u |  .04990593
         sigma_e |  .02462206
             rho |  .80423781   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    The results above are closer to my expectation but I'm just not sure if it's right.

    The other approach I tried involves the use of time dummies:

    Code:
    xtreg eg ini_lny ln_edu ini_m3 ini_gov ini_trd i.t, fe vce(robust)
    Code:
    Fixed-effects (within) regression               Number of obs     =        732
    Group variable: id                              Number of groups  =         83
    
    R-sq:                                           Obs per group:
         within  = 0.2182                                         min =          1
         between = 0.0858                                         avg =        8.8
         overall = 0.0017                                         max =         10
    
                                                    F(14,82)          =       8.84
    corr(u_i, Xb)  = -0.9626                        Prob > F          =     0.0000
    
                                        (Std. Err. adjusted for 83 clusters in id)
    ------------------------------------------------------------------------------
                 |               Robust
              eg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
         ini_lny |  -.0354297   .0050206    -7.06   0.000    -.0454173   -.0254422
          ln_edu |  -.0037857   .0041587    -0.91   0.365    -.0120588    .0044874
          ini_m3 |  -.0001256   .0000593    -2.12   0.037    -.0002437   -7.58e-06
         ini_gov |   -.000932   .0004604    -2.02   0.046    -.0018478   -.0000162
         ini_trd |   .0002988   .0000735     4.07   0.000     .0001526     .000445
                 |
               t |
              2  |   .0053626    .003445     1.56   0.123    -.0014906    .0122158
              3  |   .0062674   .0047017     1.33   0.186    -.0030857    .0156205
              4  |  -.0140571   .0050782    -2.77   0.007    -.0241592    -.003955
              5  |   .0035626   .0051512     0.69   0.491    -.0066848    .0138099
              6  |   .0017912   .0065521     0.27   0.785    -.0112431    .0148255
              7  |   .0126059   .0064515     1.95   0.054    -.0002283    .0254401
              8  |    .012388   .0067282     1.84   0.069    -.0009966    .0257726
              9  |    .016891   .0073564     2.30   0.024     .0022568    .0315253
             10  |    .023365   .0088834     2.63   0.010     .0056932    .0410369
                 |
           _cons |   .3191557   .0406118     7.86   0.000     .2383659    .3999455
    -------------+----------------------------------------------------------------
         sigma_u |  .06376517
         sigma_e |  .02336045
             rho |  .88166841   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------

    Please help me clear this confusion I have.

    Thank you!

    PS: My summary statistics:

    Code:
        Variable |        Obs        Mean    Std. Dev.       Min        Max
    -------------+---------------------------------------------------------
              id |        840        42.5    24.26144          1         84
               t |        840         5.5    2.873993          1         10
              eg |        814    .0175811    .0283199    -.13996    .112986
         ini_lny |        804    8.341237    1.531912   5.588527   11.54508
          ln_edu |        840     2.88243    .9875779  -1.714798   4.460491
    -------------+---------------------------------------------------------
         ini_gov |        787    14.55505    5.001012   3.135428   34.16856
         avr_gov |        783    14.75332    4.956445   4.080355   34.06281
         ini_trd |        785    62.31837    32.96886   7.529721   192.1141
         avr_trd |        779    61.74042    31.21065   8.422645   182.4387
          ini_m3 |        814    46.84731    38.35419   4.461628   339.1169
    -------------+---------------------------------------------------------
          avr_m3 |        827     48.7062    39.56732   6.500692   370.4257
          ini_bm |        672    .3993627    .2423745   .0407223   1.312352
          avr_bm |        667    .4269048    .2641024   .0476598    1.42723
       ini_pcred |        813    39.85124    36.84571         .4     194.88
       avr_pcred |        824    41.69704    37.99656   .7563173   222.2638
    -------------+---------------------------------------------------------

  • #2
    Your first model does not include time fixed effects. When you use -xtreg-, Stata looks at how you -xtset- the data and automatically incorporates fixed effects for the panel variable. It does not incorporate fixed effects for the time variable from -xtset-, even if one was specified. Your second model is the correct way to include time fixed effects.

    As for the two models producing different results, since they are different models, that is not surprising. Why you got results more in line with your expectations from a model that excludes time fixed effects than from one that includes them is a substantive science question. It may be that your expectations were wrong. Or it may be that there is something unusual in this data that causes it not to conform to whatever theory led to your expectations. I think you would have to get advice on this from people in your discipline.

    You don't say what the content area of your problem is, and at least for me, your variable names do not offer any hint either--I can only say that this doesn't look like anything in epidemiology! So perhaps if you explained a bit about what the context and content of this work is, somebody from your field who participates in the forum will chime in and advise whether including time fixed effects is appropriate for your problem or not. (We have people from almost every field that makes use of statistics participating here.)

    Comment


    • #3
      Kofi:
      as an aside to Clyde's excellent advice, I do not see te coefficients of your second model being so different from your first one (exception made for -ini_m3-).
      Besides, the within R-sq (which plays a relevant role in -xtreg, fe-) almost doubled in your second model, and this is good.
      Eventually, I would check the joint statistical significance of -i.t- via -testparm-, just to be sure that it is interesting to plug in among predictors (provided, as Clyde wisely said, that its inclusion is justified on a theoretical ground).
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Originally posted by Clyde Schechter View Post
        You don't say what the content area of your problem is, and at least for me, your variable names do not offer any hint either--I can only say that this doesn't look like anything in epidemiology! So perhaps if you explained a bit about what the context and content of this work is, somebody from your field who participates in the forum will chime in and advise whether including time fixed effects is appropriate for your problem or not. (We have people from almost every field that makes use of statistics participating here.)
        Thank you very much Clyde for the clarity.

        This is economics research, where:

        dependent variable is economic growth rate (eg)

        regressors:

        log Initial GDP (ini_lny)
        log secondary school enrollment rate (ln_edu)
        ini_m3 (M3/GDP as a measure of finance)
        ini_gov (govt expenditure/GDP)
        ini_trd (trade/GDP)

        My data is for a panel of 84 countries from 1965 - 2014 but grouped in 5 year non-overlapping periods (hence 10 periods).
        All right hand side values are taken as the initial value for the beginning of each 5 year period.

        From theory, ini_lny should have a negative and significant coefficient while ini_edu should be positive and and possibly significant.

        I'm basically extending the time range for similar research previously conducted using similar datasets so it is surprising that my correctly specified fixed time effects model is rather so off.

        Comment


        • #5
          Thanks for the clear explanation. I hope one of the many economists on the Forum will jump in here to advise you, as this is way outside my field.

          Comment


          • #6
            Thanks a lot Clyde at least you cleared one major confusion for me. Really grateful!

            Comment


            • #7
              Originally posted by Carlo Lazzaro
              Eventually, I would check the joint statistical significance of -i.t- via -testparm-, just to be sure that it is interesting to plug in among predictors
              Carlo:

              I really appreciate your comment. I'm quickly reading up on testparm.. Could you kindly elaborate on the above quote? Are you suggesting including -i.t- could possibly be unnecessary based on the results of a testparm?

              Comment


              • #8
                Kofi:
                I believe it is wise choice, but I would test it anyhow via -testparm-.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  Thanks Carlo. You guys are fantastic!

                  Comment

                  Working...
                  X