fwildclusterboot 0.9

library(fwildclusterboot)
library(fixest)

data(voters)
feols_fit <- feols(proposition_vote ~ i(treatment, ideology1) ,
    data = voters
)
boot1 <- boottest(feols_fit,
    B = 9999,
    param = "treatment::0:ideology1",
    clustid = "group_id1"
)

feols_fits <- fixest::feols(proposition_vote ~ treatment | sw(Q1_immigration, Q2_defense), data = voters)
res <- lapply(feols_fits, \(x) boottest(x, B = 999, param = "treatment", clustid = "group_id1"))  

voters$split <- sample(1:2, nrow(voters), TRUE)
feols_fits <- fixest::feols(proposition_vote ~ treatment, split = ~split, data = voters)

res <- lapply(feols_fits, \(x) boottest(x, B = 999, param = "treatment", clustid = "group_id1"))  

Some formula sugar still leads to errors, e.g. 

feols_fit2 <- feols(proposition_vote ~ treatment | Q1_immigration^Q2_defense,
    data = voters
)

boot1 <- boottest(feols_fit2,
    B = 9999,
    param = "treatment",
    clustid = "group_id1"
)
data(voters)
feols_fit <- feols(proposition_vote ~ treatment ,
    data = voters
)
boot <- boottest(feols_fit,
    B = 9999,
    param = ~ treatment,
    clustid = ~ group_id1
)

fwildclusterboot 0.8

Two new bootstrap algorithms: ‘WildBootTests.jl’ and ‘R-lean’

boot_algo = ‘WildBootTests.jl’

# load data set voters included in fwildclusterboot
data(voters)
# estimate the regression model via lm
lm_fit <- lm(proposition_vote ~ treatment + ideology1 + log_income + Q1_immigration , data = voters)
boot_lm <- boottest(
  lm_fit, 
  clustid = "group_id1", 
  param = "treatment", 
  B = 9999, 
  boot_algo = "WildBootTests.jl"
)
library(ivreg)
data("SchoolingReturns", package = "ivreg")
# drop all NA values from SchoolingReturns
SchoolingReturns <- SchoolingReturns[rowMeans(sapply(SchoolingReturns, is.na)) == 0,]
ivreg_fit <- ivreg(log(wage) ~ education + age + ethnicity + smsa + south + parents14 |
                           nearcollege + age  + ethnicity + smsa + south + parents14, data = SchoolingReturns)

boot_ivreg <- boottest(
  object = ivreg_fit,
  B = 999,
  param = "education",
  clustid = "kww",
  type = "mammen",
  impose_null = TRUE
)
generics::tidy(boot_ivreg)
#              term  estimate statistic   p.value    conf.low conf.high
# 1 1*education = 0 0.0638822  1.043969 0.2482482 -0.03152655 0.2128746

boot_algo = ‘R-lean’

A key limitation of the vectorized ‘fast’ cluster bootstrap algorithm as implemented in fwildclusterboot is that it is very memory-demanding. For ‘larger’ problems, running boottest() might lead to out-of-memory errors. To offer an alternative, boottest() now ships a ‘new’ rcpp- and loop-based implementation of the wild cluster bootstrap (the ‘wild2’ algorithm in Roodman et al).

boot_lm <- boottest(
  lm_fit, 
  clustid = "group_id1", 
  param = "treatment", 
  B = 9999, 
  boot_algo = "R-lean"
)

Heteroskeadstic Wild Bootstrap

It is now possible to run boottest() without specifying a clustid function argument. In this case, boottest() runs a heteroskedasticity-robust wild bootstrap (HC1), which is implemented in c++.

boot_hc1 <- boottest(lm_fit, param = "treatment", B = 9999)
summary(boot_hc1)

boottest() function argument beta0 deprecated

For consistency with WildBootTests.jl, the boottest() function argument beta0 is now replaced by a new function argument, r.

Frühjahrsputz

I have spent some time to clean up fwildclusterboot's internals, which should now hopefully be more readable and easier to maintain.

Testing

fwildclusterboot is now pre-dominantly tested against WildBootTests.jl. Tests that depend on Julia are by default not run on CRAN, but are regularly run on Mac, Windows and Linux via github actions.

fwildclusterboot 0.7

fwildclusterboot 0.6

fwildclusterboot 0.5.1

fwildclusterboot 0.5

fwilclusterboot 0.4

fwildclusterboot 0.3.7

fwildclusterboot 0.3.6

fwildclusterboot 0.3.5

fwildclusterboot 0.3.4

fwildclusterboot 0.3.3

fwildclusterboot 0.3.2

fwildclusterboot 0.3.1

fwildclusterboot 0.3.0

fwildclusterboot 0.2.0

Add support for