Skip to content
Prev 361360 / 398506 Next

sandwich package: HAC estimators

Thank you very much. I have applied the example to my case and get following results:

crisis_bubble4<-glm(stock.market.crash~crash.MA+bubble.MA+MP.MA+UTS.MA+UPR.MA+PPI.MA+RV.MA,family=binomial("logit"),data=Data_logitregression_movingaverage)
Call:
glm(formula = stock.market.crash ~ crash.MA + bubble.MA + MP.MA + 
    UTS.MA + UPR.MA + PPI.MA + RV.MA, family = binomial("logit"), 
    data = Data_logitregression_movingaverage)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.7828  -0.6686  -0.3186   0.6497   2.4298  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)   -5.2609     0.8927  -5.893 3.79e-09 ***
crash.MA       0.4922     0.4966   0.991  0.32165    
bubble.MA     12.1287     1.3736   8.830  < 2e-16 ***
MP.MA        -20.0724    96.9576  -0.207  0.83599    
UTS.MA       -58.1814    19.3533  -3.006  0.00264 ** 
UPR.MA      -337.5798    64.3078  -5.249 1.53e-07 ***
PPI.MA       729.3769    73.0529   9.984  < 2e-16 ***
RV.MA        116.0011    16.5456   7.011 2.37e-12 ***
---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 869.54  on 705  degrees of freedom
Residual deviance: 606.91  on 698  degrees of freedom
AIC: 622.91

Number of Fisher Scoring iterations: 5
z test of coefficients:

              Estimate Std. Error z value  Pr(>|z|)    
(Intercept)   -5.26088    0.89269 -5.8933 3.786e-09 ***
crash.MA       0.49219    0.49662  0.9911  0.321652    
bubble.MA     12.12868    1.37357  8.8300 < 2.2e-16 ***
MP.MA        -20.07238   96.95755 -0.2070  0.835992    
UTS.MA       -58.18142   19.35330 -3.0063  0.002645 ** 
UPR.MA      -337.57985   64.30779 -5.2494 1.526e-07 ***
PPI.MA       729.37693   73.05288  9.9842 < 2.2e-16 ***
RV.MA        116.00106   16.54560  7.0110 2.366e-12 ***
---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
z test of coefficients:

              Estimate Std. Error z value Pr(>|z|)  
(Intercept)   -5.26088    5.01706 -1.0486  0.29436  
crash.MA       0.49219    2.41688  0.2036  0.83863  
bubble.MA     12.12868    5.85228  2.0725  0.03822 *
MP.MA        -20.07238  499.37589 -0.0402  0.96794  
UTS.MA       -58.18142   77.08409 -0.7548  0.45038  
UPR.MA      -337.57985  395.35639 -0.8539  0.39318  
PPI.MA       729.37693  358.60868  2.0339  0.04196 *
RV.MA        116.00106   79.52421  1.4587  0.14465  
---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
Wald test

Model 1: stock.market.crash ~ crash.MA + bubble.MA + MP.MA + UTS.MA + 
    UPR.MA + PPI.MA + RV.MA
Model 2: stock.market.crash ~ 1
  Res.Df Df      F  Pr(>F)  
1    698                    
2    705 -7 2.3302 0.02351 *
---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
Wald test

Model 1: stock.market.crash ~ crash.MA + bubble.MA + MP.MA + UTS.MA + 
    UPR.MA + PPI.MA + RV.MA
Model 2: stock.market.crash ~ 1
  Res.Df Df  Chisq Pr(>Chisq)  
1    698                       
2    705 -7 16.311    0.02242 *
---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1

Do you agree with the methodology? I read in a book that it is also possible to use vcov=vcovHAC in the coeftest() function. Nevertheless, I am not sure what kind of HAC I generate with this command. Which weights does this command apply, which bandwith and which kernel?

Kind regards