2

Today I ran a fixed effects model in plm using unbalanced panel data with N>>T (N=5970 and T=10). Unfortunately the data is from a database that does not allow me to share it. However, my equation is the following: pl <- plm(LS~FIAS+EXPT+EMPL+AV+TURN+FIPL+EBIT+FIEX, index=c("IDNR", "CLOSDATE_year"), effect = "twoways", model="within", data=data) where LS is the wage share on micro level. The model runs smoothely and prints my results. I read in another paper that because of the structure of the data I have to adjust the standard errors by replacing them with Driscoll-Kraay robust standard errors. As far as I understand, coeftest(pl, vocov.=vcovSCC) should do the trick. The results are exactly the same however. So my question is: Am I performing the correction wrong or is plm automatically doing the adjustment?

Appendix:

> summary(pl)
Twoways effects Within Model

Call:
plm(formula = LS ~ FIAS + EXPT + EMPL + AV + TURN + FIPL + EBIT + 
    FIEX, data = data, effect = "twoways", model = "within", 
    index = c("IDNR", "CLOSDATE_year"))

Unbalanced Panel: n = 2718, T = 1-10, N = 12942

Residuals:
      Min.    1st Qu.     Median    3rd Qu.       Max. 
-1.1183188 -0.0191726 -0.0003545  0.0160751  0.5363292 

Coefficients:
        Estimate  Std. Error  t-value  Pr(>|t|)    
FIAS -4.8960e-02  1.0766e-02  -4.5475 5.490e-06 ***
EXPT -1.4202e-02  2.6751e-03  -5.3093 1.124e-07 ***
EMPL  5.3522e+03  3.0152e+02  17.7510 < 2.2e-16 ***
AV   -2.6384e-01  1.0277e-02 -25.6739 < 2.2e-16 ***
TURN  5.9762e-02  2.8426e-03  21.0235 < 2.2e-16 ***
FIPL -6.6372e-01  5.0019e-02 -13.2692 < 2.2e-16 ***
EBIT -8.5062e-01  1.2782e-02 -66.5489 < 2.2e-16 ***
FIEX -6.8813e-01  8.4500e-02  -8.1436 4.285e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Total Sum of Squares:    81.846
Residual Sum of Squares: 41.643
R-Squared:      0.4912
Adj. R-Squared: 0.35479
F-statistic: 1231.5 on 8 and 10205 DF, p-value: < 2.22e-16

> coeftest(pl, vocov.=vcovSCC)
t test of coefficients:

        Estimate  Std. Error  t value  Pr(>|t|)    
FIAS -4.8960e-02  1.0766e-02  -4.5475 5.490e-06 ***
EXPT -1.4202e-02  2.6751e-03  -5.3093 1.124e-07 ***
EMPL  5.3522e+03  3.0152e+02  17.7510 < 2.2e-16 ***
AV   -2.6384e-01  1.0277e-02 -25.6739 < 2.2e-16 ***
TURN  5.9762e-02  2.8426e-03  21.0235 < 2.2e-16 ***
FIPL -6.6372e-01  5.0019e-02 -13.2692 < 2.2e-16 ***
EBIT -8.5062e-01  1.2782e-02 -66.5489 < 2.2e-16 ***
FIEX -6.8813e-01  8.4500e-02  -8.1436 4.285e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

UPDATE: I ran the same model with lm() and received the following output:

> l <- lm(LS~FIAS+EXPT+EMPL+AV+TURN+FIPL+EBIT+FIEX+factor(CLOSDATE_year)+factor(IDNR), data)
> summary(l)

Call:
lm(formula = LS ~ FIAS + EXPT + EMPL + AV + TURN + FIPL + EBIT + 
    FIEX + factor(CLOSDATE_year) + factor(IDNR), data = data)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.11832 -0.01917 -0.00035  0.01608  0.53633 

Coefficients:
                            Estimate Std. Error t value Pr(>|t|)    
(Intercept)                1.011e+00  3.316e-02  30.493  < 2e-16 ***
FIAS                      -4.896e-02  1.077e-02  -4.548 5.49e-06 ***
EXPT                      -1.420e-02  2.675e-03  -5.309 1.12e-07 ***
EMPL                       5.352e+03  3.015e+02  17.751  < 2e-16 ***
AV                        -2.638e-01  1.028e-02 -25.674  < 2e-16 ***
TURN                       5.976e-02  2.843e-03  21.023  < 2e-16 ***
FIPL                      -6.637e-01  5.002e-02 -13.269  < 2e-16 ***
EBIT                      -8.506e-01  1.278e-02 -66.549  < 2e-16 ***
FIEX                      -6.881e-01  8.450e-02  -8.144 4.29e-16 ***
factor(CLOSDATE_year)2009  6.487e-04  1.573e-02   0.041 0.967102    

> coeftest(l, vocov.=vcovSCC)

t test of coefficients:

                             Estimate  Std. Error  t value  Pr(>|t|)    
(Intercept)                1.0112e+00  3.3160e-02  30.4930 < 2.2e-16 ***
FIAS                      -4.8960e-02  1.0766e-02  -4.5475 5.490e-06 ***
EXPT                      -1.4203e-02  2.6750e-03  -5.3093 1.124e-07 ***
EMPL                       5.3522e+03  3.0152e+02  17.7510 < 2.2e-16 ***
AV                        -2.6384e-01  1.0277e-02 -25.6739 < 2.2e-16 ***
TURN                       5.9762e-02  2.8426e-03  21.0235 < 2.2e-16 ***
FIPL                      -6.6372e-01  5.0019e-02 -13.2692 < 2.2e-16 ***
EBIT                      -8.5062e-01  1.2782e-02 -66.5489 < 2.2e-16 ***
FIEX                      -6.8813e-01  8.4500e-02  -8.1436 4.285e-16 ***
factor(CLOSDATE_year)2009  6.4867e-04  1.5728e-02   0.0412 0.9671020

As the coefficients are the same, but the SEs get updated that this suggests that indeed plm is directly estimating robust Standard Errors, right?

roewizz
  • 21
  • 2
  • There is a typo in your code. `coeftest(pl, vcov.=vcovSCC)` it should be. – Helix123 May 22 '20 at 08:02
  • I totally did not see that, thanks! It's weird though that it didn't throw an error but just reprinted the original results. Anyway, I get the correct results now. Thanks! – roewizz May 23 '20 at 14:46
  • 1
    An error is not returned as `coeftest` has the ellipsis (`...`) in its function signature so any wrongly named argument goes into that. – Helix123 May 23 '20 at 14:56
  • So, does this answer your question? – Helix123 May 23 '20 at 14:57
  • Yes absolutely. I am going to close the question then if I find the corresponding button. :) – roewizz May 23 '20 at 14:59

0 Answers0