Announcement

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

  • xtreg -fe vs xtpcse, what is the difference between them?

    Dear All,

    Hello, I am a Korean student with a question on panel analysis.
    I understand the meaning of fixed effect coefficient (within effect), but I was wondering what Panel FGLS coefficient (comes from xtpcse, Prais-Winston) means.
    I have looked at stata manual sheets for solutions, but I couldn't solve it.
    So, if there's anyone who can tell me the difference of coefficient between xtreg -fe and xtpcse, I'd much appreciate it.
    (Like, fixed effect coefficient =within effect, Panel FGLS coefficient = ???)

    Thank you so much in advance.
    Last edited by SangWon Choi; 23 Dec 2021, 01:46. Reason: Panel, Fixed effect, FGLS

  • #2
    SangWon:
    -xtreg- is for N>T panel datasets. By default, it assumes that -epsilon- is neither heteroskedastic, nor autocorrelated within and/or across panels;
    -xtpcse- is mainlty for T>N panel datasets. Quoting from its helpfile,
    ...xtpcse assumes that the disturbances are, by default, heteroskedastic and contemporaneously correlated across panels.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Thank you for your post Carlo,

      Yes, actually, I have seen many of your posts to study panel analysis and these are so helpful. Thank you again.
      Maybe I would make my question much more precise.
      Then how about results analysis each of them?

      for example like below,

      fixed effects model
      age = 3.6 + 1.6*exercise_hours + residuals

      Panel FGLS model
      age = 3.6 + 1.6*exercise_hours + residuals

      in each model, the variable 'exercise' coefficients are the same. In fixed effect, I would say 'increasing exercise hours by 1 will increase 1.6 age
      Then is it right to say in the same way about coefficient of panel FGLS?

      Comment


      • #4
        SangWon:
        yes. As you can see in the following toy-example, the predicted values are the same:
        Code:
        . use https://www.stata-press.com/data/r17/grunfeld.dta
        
        . xtreg mvalue c.time##c.time, fe
        
        Fixed-effects (within) regression               Number of obs     =        200
        Group variable: company                         Number of groups  =         10
        
        R-squared:                                      Obs per group:
             Within  = 0.1025                                         min =         20
             Between =      .                                         avg =       20.0
             Overall = 0.0069                                         max =         20
        
                                                        F(2,188)          =      10.74
        corr(u_i, Xb) = -0.0000                         Prob > F          =     0.0000
        
        -------------------------------------------------------------------------------
               mvalue | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
        --------------+----------------------------------------------------------------
                 time |   -29.4019   17.12643    -1.72   0.088    -63.18657     4.38277
                      |
        c.time#c.time |    2.13131   .7921775     2.69   0.008     .5686106    3.694009
                      |
                _cons |   1084.558   78.09038    13.89   0.000     930.5121    1238.604
        --------------+----------------------------------------------------------------
              sigma_u |  1334.9167
              sigma_e |  331.92143
                  rho |  .94177501   (fraction of variance due to u_i)
        -------------------------------------------------------------------------------
        F test that all u_i=0: F(9, 188) = 323.50                    Prob > F = 0.0000
        
        . predict fitted, xb
        
        . xtpcse mvalue c.time##c.time
        
        Linear regression, correlated panels corrected standard errors (PCSEs)
        
        Group variable:   company                       Number of obs     =        200
        Time variable:    year                          Number of groups  =         10
        Panels:           correlated (balanced)         Obs per group:
        Autocorrelation:  no autocorrelation                          min =         20
                                                                      avg =         20
                                                                      max =         20
        Estimated covariances      =        55          R-squared         =     0.0069
        Estimated autocorrelations =         0          Wald chi2(2)      =       8.94
        Estimated coefficients     =         3          Prob > chi2       =     0.0114
        
        -------------------------------------------------------------------------------
                      |           Panel-corrected
               mvalue | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
        --------------+----------------------------------------------------------------
                 time |   -29.4019   26.53782    -1.11   0.268    -81.41507    22.61127
                      |
        c.time#c.time |    2.13131   1.227498     1.74   0.083    -.2745428    4.537162
                      |
                _cons |   1084.558   121.0029     8.96   0.000     847.3967     1321.72
        -------------------------------------------------------------------------------
        
        . predict fitted2, xb
        
        . list company time mvalue fitted fitted2 fitted2 if company==1
        
             +----------------------------------------------------------+
             | company   time   mvalue     fitted    fitted2    fitted2 |
             |----------------------------------------------------------|
          1. |       1      1   3078.5   1057.288   1057.288   1057.288 |
          2. |       1      2   4661.7    1034.28    1034.28    1034.28 |
          3. |       1      3   5387.1   1015.534   1015.534   1015.534 |
          4. |       1      4   2792.2   1001.051   1001.051   1001.051 |
          5. |       1      5   4313.2   990.8314   990.8314   990.8314 |
             |----------------------------------------------------------|
          6. |       1      6   4643.9   984.8739   984.8739   984.8739 |
          7. |       1      7   4551.2    983.179    983.179    983.179 |
          8. |       1      8   3244.1   985.7468   985.7468   985.7468 |
          9. |       1      9   4053.7   992.5771   992.5771   992.5771 |
         10. |       1     10   4379.3    1003.67    1003.67    1003.67 |
             |----------------------------------------------------------|
         11. |       1     11   4840.9   1019.026   1019.026   1019.026 |
         12. |       1     12   4900.9   1038.644   1038.644   1038.644 |
         13. |       1     13   3526.5   1062.525   1062.525   1062.525 |
         14. |       1     14   3254.7   1090.668   1090.668   1090.668 |
         15. |       1     15   3700.2   1123.074   1123.074   1123.074 |
             |----------------------------------------------------------|
         16. |       1     16   3755.6   1159.743   1159.743   1159.743 |
         17. |       1     17     4833   1200.674   1200.674   1200.674 |
         18. |       1     18   4924.9   1245.868   1245.868   1245.868 |
         19. |       1     19   6241.7   1295.325   1295.325   1295.325 |
         20. |       1     20   5593.6   1349.044   1349.044   1349.044 |
             +----------------------------------------------------------+
        Tha said, I would not consider these two codes as interchangeable, as their underlying assumptions are pretty different.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Thank you Carlo, Then, the important things are underlying assumptions. Now I understand!
          It is helpful to me. Thank you again, and I wish you have good Christmas day!

          Regards,
          Choi, Sangwon.

          Comment


          • #6
            Choi, Sangwon:
            happy with reading that it was of some help.
            Thanks for the XMas wishes: I do reciprocate the very same to you and your dears.
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment

            Working...
            X