1

I have a fixed effects model with only few observations and would therefore like to bootstrap in order to obtain more accurate standard errors. At the same time, I assume SE to be clustered thus I would also like to correct for clustering, i.e. do a cluster bootstrap. I found a function for lm models (vcovBS), however could not find anything for plm models. Does anybody know an analogous function to obtain cluster bootstrapped SE for fixed effects models?

Laura
  • 31
  • 2

1 Answers1

1

The clusterSEs package has an implementation of the wild cluster bootstrap for plm models: https://www.rdocumentation.org/packages/clusterSEs/versions/2.6.2/topics/cluster.wild.plml.

An alternative package is fwildclusterboot. It does not work with plm but with two other fixed effects regression packages, lfe and fixest, and should be significantly faster than clusterSEs.

With the fixest package, its syntax would look like this:

library(fixest)
library(fwildclusterboot)

# load data set voters included in fwildclusterboot
data(voters)

# estimate the regression model via feols
feols_fit <- feols(proposition_vote ~ treatment + ideology1 + log_income + Q1_immigration , data = voters)

# bootstrap inference 
boot_feols <- boottest(feols_fit, clustid = "group_id1", param = "treatment", B = 9999)

summary(boot_feols)
#> boottest.fixest(object = lm_fit, clustid = "group_id1", param = "treatment", 
#>     B = 9999)
#>  
#>  Observations: 300
#>  Bootstr. Iter: 9999
#>  Bootstr. Type: rademacher
#>  Clustering: 1-way
#>  Confidence Sets: 95%
#>  Number of Clusters: 40
#> 
#>        term estimate statistic p.value conf.low conf.high
#> 1 treatment    0.073     3.786   0.001    0.033     0.114
A.Fischer
  • 596
  • 5
  • 11
  • Thanks for the quick reply. Unfortunately boottest does not compute standard errors. Anybody here knows a function that does compute bootstrapped SE? – Laura Apr 05 '21 at 10:49