Announcement

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

  • Method to employ with heteroscedasticity, cross sectional dependence, serial correlation and time effects as well in panel data

    Hi
    I have a problem with my panel data (9 states, 20 years)
    I have heteroscedasticity, cross sectional dependence, serial correlation and I need to include time effects as well. Which standard errors should I use. If I use xtscc I would have to drop the time effects. If I used clustered I would have not correct for cross sectional dependence.
    I notice in this paper: https://www.degruyter.com/downloadpd...-2015-0167.pdf they correct for everything above:
    "We employ a method to estimate standard errors and hypothesis tests robust to heteroskedasticity, serial correlation, and spatial correlation developed by Vogelsang (2012) that extends the Driscoll and Kraay (1998) approach with state fixed effects to a setting with state and time effects"
    Is this possible to do in stata?

    Regards Rob

  • #2
    Rob:
    you can use factor variable notation with -xtscc- if you prefix your regression code with -xi:-, as in the following toy-example:
    Code:
    webuse grunfeld
    . xi: xtscc invest mvalue kstock i.time, fe lag(4)
    i.time            _Itime_1-20         (naturally coded; _Itime_1 omitted)
    
    Regression with Driscoll-Kraay standard errors   Number of obs     =       200
    Method: Fixed-effects regression                 Number of groups  =        10
    Group variable (i): company                      F( 21,     9)     =      6.38
    maximum lag: 4                                   Prob > F          =    0.0035
                                                     within R-squared  =    0.7985
    
    ------------------------------------------------------------------------------
                 |             Drisc/Kraay
          invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          mvalue |   .1177158   .0220019     5.35   0.000      .067944    .1674877
          kstock |   .3579163   .0529491     6.76   0.000      .238137    .4776955
        _Itime_2 |  -19.19741   8.045977    -2.39   0.041    -37.39867   -.9961414
        _Itime_3 |  -40.69001   13.78463    -2.95   0.016    -71.87302   -9.506995
        _Itime_4 |   -39.2264   4.424035    -8.87   0.000    -49.23427   -29.21854
        _Itime_5 |  -69.47029   8.399176    -8.27   0.000    -88.47055   -50.47003
        _Itime_6 |  -44.23507   9.444775    -4.68   0.001    -65.60064   -22.86951
        _Itime_7 |  -18.80446   8.966701    -2.10   0.065    -39.08855    1.479626
        _Itime_8 |  -21.13979    7.47027    -2.83   0.020    -38.03872   -4.240867
        _Itime_9 |  -42.97762   8.822276    -4.87   0.001    -62.93499   -23.02024
       _Itime_10 |  -43.09876   9.131187    -4.72   0.001    -63.75494   -22.44258
       _Itime_11 |  -55.68303   10.88328    -5.12   0.001    -80.30272   -31.06335
       _Itime_12 |  -31.16928   12.24854    -2.54   0.031     -58.8774   -3.461165
       _Itime_13 |  -39.39223    12.6387    -3.12   0.012    -67.98296   -10.80151
       _Itime_14 |  -43.71651    14.6574    -2.98   0.015    -76.87385   -10.55917
       _Itime_15 |   -73.4951   16.46399    -4.46   0.002    -110.7392   -36.25097
       _Itime_16 |  -75.89611   17.53525    -4.33   0.002    -115.5636   -36.22862
       _Itime_17 |   -62.4809   19.56282    -3.19   0.011    -106.7351   -18.22672
       _Itime_18 |  -64.63233   22.51298    -2.87   0.018    -115.5602   -13.70442
       _Itime_19 |  -67.71796   27.57538    -2.46   0.036    -130.0978   -5.338122
       _Itime_20 |  -93.52622   30.85483    -3.03   0.014    -163.3247   -23.72776
           _cons |  -32.83631   15.04733    -2.18   0.057    -66.87573    1.203114
    ------------------------------------------------------------------------------
    
    
    .
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment

    Working...
    X