Announcement

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

  • Help on understanding Cross-sectional dependence

    Hello together,

    I need some help in understanding cross-sectional dependence regarding the use of Driscoll-Kraay standard errors (code -xtscc-).
    1.) What does cross-sectional dependence intuitively mean? If I have a panel checking GDP per capita on life expectancy of e.g. t=20 and n=20 EU countries, does it explain the dependence of the effect measured in Germany on another cross section such as France and Italy?

    2.) If yes, in how far does this design a statistical problem?

    Additional Question 3.) If in cross-sec. dependence occurs next to heteroskedasticity and autocorrelation in a panel data set, is there an argument to use either POLS over Fixed effects?

    I need an easy approach to understand the concept and issues related to cross sectional dependence. Unfortunately, the textbooks at hand do not give me a tangible explanation.

    Thank you, apreciate every help.

    BR
    Kevin

  • #2
    Kevin:
    1) if a shock (like pandemic; increased cost of raw materials) hits all the countries in your panel dataset, panels systematic error is possibly correlated across panels.
    2) as per its help file of the community-contributed module -xtscc-
    The error structure is assumed to be heteroskedastic, autocorrelated up to some lag, and possibly correlated between the groups (panels).
    3) no, as the -xtscc- help file includes examples with POLS and Fixe effect speciifcation.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Kevin:
      1) if a shock (like pandemic; increased cost of raw materials) hits all the countries in your panel dataset, panels systematic error is possibly correlated across panels.
      2) as per its help file of the community-contributed module -xtscc-
      3) no, as the -xtscc- help file includes examples with POLS and Fixe effect speciifcation.
      Thank you, makes it clearer to me.

      to 1) so e.g. increases / decreases in investment spendings in 2008-10 accross all obsereved countries due to the financial crisis could be such a cross sectional effect?

      Thanks in advance!

      Comment


      • #4
        Kevin:
        yes, I think so.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Hope I can write here in order to know if Driscoll-Kraay is or not the best way to delay with cross-section dependence. My dataset is a panel dataset where the group variable identifies countries of the world (113 total) and my time variable is year (17 total 2002-2018). If I use the command xtcdf on my variable used in a fe regression with year dummies I obtain the following result

          Code:
          xtcd test on variables LSECI LRR1 LP LSFI1 LPA LTO LFDI LGC
          Panelvar: Code
          Timevar: year
          ------------------------------------------------------------------------------+
              Variable    |  CD-test   p-value   average joint T | mean ρ   mean abs(ρ) |
          ----------------+--------------------------------------+----------------------|
               LSECI      +  2.077      0.038         16.95      +  0.01       0.26     |
                LRR1      +  71.174     0.000         16.93      +  0.22       0.48     |
                 LP       +  140.21     0.000         17.00      +  0.43       0.92     |
               LSFI1      +  51.619     0.000         16.93      +  0.16       0.35     |
                LPA       +  -.614      0.539         12.06      +  0.00       0.37     | 556 combinations of panel units ignored (insuffic
          > ient joint observations).
                LTO       +  48.379     0.000         16.69      +  0.15       0.45     | 333 combinations of panel units ignored (insuffic
          > ient joint observations).
                LFDI      +  33.322     0.000         16.84      +  0.10       0.27     |
                LGC       +  28.988     0.000         16.98      +  0.09       0.46     |
          ------------------------------------------------------------------------------+
           Notes: Under the null hypothesis of cross-section independence, CD ~ N(0,1)
                  P-values close to zero indicate data are correlated across panel groups.
          I couldn't use xtcsd command because of the error
          Code:
          unknown function *sqrt()
          r(133);
          which disappears when I reduce missing values used in the model.

          Driscoll-Kraay of xtscc is the best way to delay with cross-section dependence? Is the same if I use it with the ivreg2 command? (Option dkraay)

          Comment


          • #6
            Marco:
            if you're not dealing with an instrumental variables regression due to previous endogeneity detection, I would prefer the community-contributed module -xtscc-.
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment


            • #7
              Originally posted by Carlo Lazzaro View Post
              Marco:
              if you're not dealing with an instrumental variables regression due to previous endogeneity detection, I would prefer the community-contributed module -xtscc-.
              when I use year dummies, do I have to prove their joint significance with testparm after xtreg, given the problem of cross-correlation, or do I have to use testparm after xtscc? I can't get the difference from a theoretical point of view between those two tests. I ask because I tried them and I obtained different results, also I've read in the forum that xtscc can't be used for testparm https://www.statalist.org/forums/for...ffects-dummies

              Comment


              • #8
                Marco:
                the community-contributed module -xtscc- does niot support -ffvarlist- notation; hence, you have to prefix your code with -xi:-.
                Unfortunately, this trick does not allow you to use the postestimation command -testparm-.
                That said, it seems that the Stata thread you mention covers a slightly different topic.
                Kind regards,
                Carlo
                (StataNow 18.5)

                Comment


                • #9
                  Originally posted by Carlo Lazzaro View Post
                  Marco:
                  the community-contributed module -xtscc- does niot support -ffvarlist- notation; hence, you have to prefix your code with -xi:-.
                  Unfortunately, this trick does not allow you to use the postestimation command -testparm-.
                  That said, it seems that the Stata thread you mention covers a slightly different topic.
                  Sorry but I don't understand: I've obtained results with testparm after xtscc estimation. From a theoretical point of view someone in the topic linked above talked about the incorrect approach of testparm after xtscc estimation because of the robustness to cross-correlation. If I know from Pesaran test that I've the same problem what kind of test do I have to use to prove that? Testparm after xtreg?

                  Comment


                  • #10
                    Marco:
                    could you please share the output that -testparm- gave you back after -xtscc- regression? Thanks.
                    Kind regards,
                    Carlo
                    (StataNow 18.5)

                    Comment


                    • #11
                      Code:
                      xtscc LSECI LRR1 LP LSFI1 LPA LTO LFDI LGC i.year, fe
                      
                      Regression with Driscoll-Kraay standard errors   Number of obs     =      1508
                      Method: Fixed-effects regression                 Number of groups  =       110
                      Group variable (i): Code                         F( 23,    16)     =  14179.42
                      maximum lag: 2                                   Prob > F          =    0.0000
                                                                       within R-squared  =    0.0305
                      
                      ------------------------------------------------------------------------------
                                   |             Drisc/Kraay
                             LSECI | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
                      -------------+----------------------------------------------------------------
                              LRR1 |   .0025457   .0017535     1.45   0.166    -.0011715     .006263
                                LP |  -.0140416   .0653391    -0.21   0.833    -.1525544    .1244712
                             LSFI1 |   -.055105   .0256381    -2.15   0.047    -.1094555   -.0007546
                               LPA |   .0147398   .0074884     1.97   0.067    -.0011349    .0306145
                               LTO |    .073039   .0800951     0.91   0.375     -.096755    .2428331
                              LFDI |   .0127518   .0039459     3.23   0.005     .0043869    .0211168
                               LGC |   -.116587   .0467708    -2.49   0.024    -.2157367   -.0174372
                                   |
                              year |
                             2002  |          0  (empty)
                             2003  |  -.0325834   .0032978    -9.88   0.000    -.0395744   -.0255924
                             2004  |  -.1283648   .0063239   -20.30   0.000    -.1417709   -.1149588
                             2005  |  -.0370461   .0095844    -3.87   0.001     -.057364   -.0167281
                             2006  |  -.0369811    .015851    -2.33   0.033    -.0705838   -.0033784
                             2007  |  -.0417635   .0167023    -2.50   0.024    -.0771709   -.0063561
                             2008  |  -.0704306    .019492    -3.61   0.002    -.1117517   -.0291095
                             2009  |  -.0559012   .0108546    -5.15   0.000    -.0789118   -.0328906
                             2010  |  -.0493502   .0155108    -3.18   0.006    -.0822317   -.0164688
                             2011  |  -.0594414   .0229105    -2.59   0.020    -.1080096   -.0108733
                             2012  |  -.0522049   .0223444    -2.34   0.033    -.0995729    -.004837
                             2013  |  -.0232414   .0230574    -1.01   0.328    -.0721208    .0256381
                             2014  |  -.0237761   .0236271    -1.01   0.329    -.0738634    .0263111
                             2015  |  -.0101004   .0217675    -0.46   0.649    -.0562453    .0360446
                             2016  |  -.0498322   .0209963    -2.37   0.030    -.0943424   -.0053221
                             2017  |  -.0149843   .0229599    -0.65   0.523    -.0636571    .0336886
                             2018  |  -.0172059   .0238944    -0.72   0.482    -.0678597     .033448
                                   |
                             _cons |   -.029648   1.248974    -0.02   0.981    -2.677354    2.618058
                      ------------------------------------------------------------------------------
                      
                      
                      . testparm i.year
                      
                       ( 1)  2003.year = 0
                       ( 2)  2004.year = 0
                       ( 3)  2005.year = 0
                       ( 4)  2006.year = 0
                       ( 5)  2007.year = 0
                       ( 6)  2008.year = 0
                       ( 7)  2009.year = 0
                       ( 8)  2010.year = 0
                       ( 9)  2011.year = 0
                       (10)  2012.year = 0
                       (11)  2013.year = 0
                       (12)  2014.year = 0
                       (13)  2015.year = 0
                       (14)  2016.year = 0
                       (15)  2017.year = 0
                       (16)  2018.year = 0
                      
                             F( 16,    16) = 7.4e+06
                                  Prob > F =    0.0000

                      Comment


                      • #12
                        Marco:
                        tahnsk for sharing.
                        I forgot to update the community-contributed -xtscc- module on my copy of Stata release #17.
                        As far as your last question is concerned:
                        1) -i.timevar- should be included in -fe-;
                        2) the thread you mention seems to focus of the opportunity of:
                        Code:
                        testparm i.panelid
                        Kind regards,
                        Carlo
                        (StataNow 18.5)

                        Comment


                        • #13
                          Originally posted by Carlo Lazzaro View Post
                          Marco:
                          tahnsk for sharing.
                          I forgot to update the community-contributed -xtscc- module on my copy of Stata release #17.
                          As far as your last question is concerned:
                          1) -i.timevar- should be included in -fe-;
                          2) the thread you mention seems to focus of the opportunity of:
                          Code:
                          testparm i.panelid
                          So is not a problem to use testparm after xtscc from a theoretical point of view? Are results reliable?

                          Comment


                          • #14
                            Marco:
                            if -testparm- tests the joint statistical significance of -i.timevar- I think that results are reliable.
                            Kind regards,
                            Carlo
                            (StataNow 18.5)

                            Comment


                            • #15
                              Thank you Carlo Lazzaro

                              Comment

                              Working...
                              X