Announcement

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

  • checking serial correlation, heteroskedasticity & cross-sectional dependence (csd) after vce (robust) /(cluster panelid) for FE model

    Hello everyone,

    I have a panel data which consists of 13 countries from 1998-2016. After run fixed-effect model, I found that the model suffers from serial correlation, heteroskedasticity and cross-sectional dependence. I have read that by including robust/ cluster option will remove the problems. My question is, do we need to recheck the
    Code:
    xttest3
    (heteroskedasticity),
    Code:
    xttest2
    (serial correlation) and
    Code:
    xtcsd, pesaran abs
    (csd) again after we applied the robust/ cluster option? Or should I just proceed with other model e.g. fgls?

    Your comments are highly appreciated.

    Thank you!

  • #2
    Farah:
    the main issue is that you have a T>N panel dataset: I would consider -xtgls-.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Dear Carlo,

      Thank you very much for the comment. Yes I have read in the http://fmwww.bc.edu/repec/bocode/x/xtscc_paper.pdf that xtgls will remove the problems.

      However, I still have some difficulties after reading the article. Can I know whether:

      i) do we need to perform the diagnostic checking again after robust/cluster option?
      ii)Or straight run the FGLS model?

      For example:

      Code:
      . xtreg lric lgdp1 fdi1 elec1 sub fit econfre pc2, fe vce(cluster country1)
      
      Fixed-effects (within) regression               Number of obs     =        266
      Group variable: country1                        Number of groups  =         14
      
      R-sq:                                           Obs per group:
           within  = 0.6887                                         min =         19
           between = 0.0175                                         avg =       19.0
           overall = 0.0192                                         max =         19
      
                                                      F(7,13)           =      43.59
      corr(u_i, Xb)  = -0.9708                        Prob > F          =     0.0000
      
                                    (Std. Err. adjusted for 14 clusters in country1)
      ------------------------------------------------------------------------------
                   |               Robust
              lric |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
             lgdp1 |   1.020152   .2386451     4.27   0.001     .5045905    1.535713
              fdi1 |  -.0214613   .0095982    -2.24   0.044    -.0421969   -.0007257
             elec1 |  -.0016129   .0025826    -0.62   0.543    -.0071924    .0039666
               sub |   .0852484   .1609255     0.53   0.605    -.2624101    .4329069
               fit |  -.0605906   .0897902    -0.67   0.512    -.2545705    .1333894
           econfre |   .0402309   .0118867     3.38   0.005     .0145512    .0659106
               pc2 |   .0531416   .0364841     1.46   0.169    -.0256775    .1319607
             _cons |  -19.10712    5.29923    -3.61   0.003    -30.55541   -7.658826
      -------------+----------------------------------------------------------------
           sigma_u |   7.259873
           sigma_e |  .25020294
               rho |  .99881365   (fraction of variance due to u_i)
      ------------------------------------------------------------------------------
      
      . 
      end of do-file
      I perform the diagnostic checking after clustering the standard error for the country, yet the model still suffers from heterokedasticity and serial correlation.

      Code:
       xttest3
      
      Modified Wald test for groupwise heteroskedasticity
      in fixed effect regression model
      
      H0: sigma(i)^2 = sigma^2 for all i
      
      chi2 (14)  =     468.30
      Prob>chi2 =      0.0000
      Code:
      xttest2
       
      Correlation matrix of residuals:
      
                __e1     __e2     __e3     __e4     __e5     __e6     __e7     __e8     __e9    __e10    __e11    __e12    __e13    __e14
       __e1   1.0000
       __e2   0.8055   1.0000
       __e3   0.0897  -0.3908   1.0000
       __e4  -0.3465  -0.4394  -0.2234   1.0000
       __e5   0.7236   0.9160  -0.3656  -0.5124   1.0000
       __e6   0.5282   0.5831   0.1990  -0.6732   0.5057   1.0000
       __e7   0.5345   0.2149   0.5830  -0.4119   0.3152   0.3412   1.0000
       __e8  -0.5190  -0.7816   0.6455   0.0080  -0.6737  -0.2463   0.1835   1.0000
       __e9  -0.7339  -0.8808   0.3142   0.4756  -0.7453  -0.5884   0.0024   0.6871   1.0000
      __e10   0.1663  -0.1705   0.7332  -0.3426  -0.0809   0.3353   0.6163   0.3617   0.2226   1.0000
      __e11   0.7036   0.8896  -0.2623  -0.5979   0.8591   0.6158   0.1354  -0.6244  -0.9168  -0.0560   1.0000
      __e12  -0.7404  -0.8361   0.1258   0.6156  -0.7509  -0.6229  -0.3311   0.4653   0.8493  -0.0041  -0.8900   1.0000
      __e13   0.4905   0.6511  -0.1662  -0.3738   0.5200   0.5048  -0.1520  -0.5076  -0.8108  -0.0781   0.8539  -0.7402   1.0000
      __e14   0.7609   0.9111  -0.3326  -0.3029   0.8684   0.5530   0.3147  -0.7447  -0.6958  -0.1186   0.7321  -0.6897   0.4430   1.0000
      
      Breusch-Pagan LM test of independence: chi2(91) =   545.873, Pr = 0.0000
      Based on 19 complete observations
      
      . 
      end of do-file
      Code:
      xtcsd, pesaran abs 
       
       
      Pesaran's test of cross sectional independence =     1.134, Pr = 0.2566
       
      Average absolute value of the off-diagonal elements =     0.499
      Thank you very much for being helpful.

      Comment


      • #4
        Farah:
        with T>N, serial correlation can bite pretty hard.
        That's why I would switch to -xtgls- leaving -xtreg- approach behind.
        Last edited by Carlo Lazzaro; 17 Apr 2018, 23:38.
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #5
          Robust/cluster only affect standard errors, not coefficients. As a result, your residuals will remain the same and as a result most serial correlation tests will remain identical. I don't recall there being any SC tests that use the variance matrix of the regression in their calculations.

          Comment


          • #6
            Dear both,

            Many thanks for your helpful reply.

            I have another question, since I am doing the analysis for my thesis, is it worth to report the FE model that did not pass the diagnostic checking , and then FGLS estimator is applied?

            Thank you for your feedback.

            Comment


            • #7
              Farah:
              I would present -xtgls- regression only.
              Kind regards,
              Carlo
              (Stata 18.0 SE)

              Comment


              • #8
                Dear Carlo,

                Thank you for your comment. I shall get back if I have any query.

                Comment


                • #9
                  Dear Carlo,

                  I have one more question, meanwhile, can I report the result of the -vce robust and compare the coefficients with FGLS estimator?

                  I am sorry it's just that I want to be sure I did the right thing.

                  Thank you!

                  Comment


                  • #10
                    Farah:
                    as you have a T>N panel dataset, I would assume that -xtreg- is simply not the right choice.
                    Kind regards,
                    Carlo
                    (Stata 18.0 SE)

                    Comment


                    • #11
                      Thank you Carlo for always being helpful!

                      Comment


                      • #12
                        My pleasure.
                        All the best for you and your research.
                        Kind regards,
                        Carlo
                        (Stata 18.0 SE)

                        Comment


                        • #13
                          Originally posted by Carlo Lazzaro View Post
                          Farah:
                          I would present -xtgls- regression only.
                          Hi Carlo,
                          I think I have a somewhat similar challenge. I am well aware that in case where T>N i would use xtgls. What I want to be sure of is whether by using xtgls I can no longer estimate fe and / or re.

                          Comment


                          • #14
                            Thabiso:
                            you may want to take a look at -xtregar-.
                            Kind regards,
                            Carlo
                            (Stata 18.0 SE)

                            Comment


                            • #15
                              Hi Carlo,

                              Thanks for the response.

                              According to my understanding, the -xtregar- would not take care of heteroskedastic errors, would it?

                              Comment

                              Working...
                              X