Hi,
I’m running a fixed-effect panel analysis (relationship between real exchange rate and some predictors) — full disclosure: I’m an economist… sorry. (also I’m totally Bayesian inside, but just a clumsy one outside)
When I run with plm and use robust standard errors, a number of regressors become insignificant (otherwise they are all highly significant).
I’d prefer to run the same regression with stan_glm using id’s as factors. Yet the outcome is super tight confidence bands. What should I do to correct for possible heteroskedasticity, autocorrelation and clustering?
Below some more info
# running with PLM
fit.check<-plm(data=df.tmp,formula=form,
effect='individual',method='within',index=c("cc","year"))
# NO VCOV CORRECTION (top regressors)
Estimate Std. Error t-value Pr(>|t|)
M3_ratedif 0.04700513 0.00329939 14.2466 < 2.2e-16 ***
DLOIL3m -0.04480392 0.00091979 -48.7108 < 2.2e-16 ***
VIX -0.00126017 0.00020408 -6.1750 7.079e-10 ***
DL_PC_CDS3m -0.00951601 0.00092391 -10.2997 < 2.2e-16 ***
DCDS 0.01957848 0.00128899 15.1890 < 2.2e-16 ***
summary(fit.pst,vcov=function(x)vcovHC(x,method="arellano", type = "HC3",cluster="group"))
Estimate Std. Error t-value Pr(>|t|)
M3_ratedif 0.04700513 0.02502063 1.8787 0.0603431 .
DLOIL3m -0.04480392 0.00514100 -8.7150 < 2.2e-16 ***
VIX -0.00126017 0.00066373 -1.8986 0.0576651 .
DL_PC_CDS3m -0.00951601 0.00162978 -5.8388 5.550e-09 ***
DCDS 0.01957848 0.01319470 1.4838 0.1379140
# BAYESIAN ESTIMATION
fit.check2<-stan_glm(data=df.tmp,formula=update(form,'.~.+factor(cc)'),iter=10000)
mean | mcse | sd | 10% | 50% | 90% | n_eff | Rhat | |
---|---|---|---|---|---|---|---|---|
(Intercept) | 2.647 | 0.001 | 0.025 | 2.615 | 2.647 | 2.680 | 1606 | 1.003 |
M3_ratedif | 0.047 | 0.000 | 0.003 | 0.043 | 0.047 | 0.051 | 7429 | 1.000 |
DLOIL3m | -0.045 | 0.000 | 0.001 | -0.046 | -0.045 | -0.044 | 19461 | 1.000 |
VIX | -0.001 | 0.000 | 0.000 | -0.002 | -0.001 | -0.001 | 15896 | 1.000 |
DL_PC_CDS3m | -0.010 | 0.000 | 0.001 | -0.011 | -0.010 | -0.008 | 13120 | 1.000 |
DCDS | 0.020 | 0.000 | 0.001 | 0.018 | 0.020 | 0.021 | 2638 | 1.002 |