WildBootTests.jl performs wild bootstrap-based hypothesis tests at extreme speed. It is intended mainly for linear models: ordinary least squares (OLS) and instrumental variables/two-stage least squares (IV/2SLS). For an introduction to the wild bootstrap and the algorithms deployed here, see Roodman et al. (2019).

The package offers and/or supports:

  • The wild bootstrap for OLS (Wu 1986).
  • The Wild Restricted Efficient bootstrap (WRE) for IV/2SLS/LIML (Davidson and MacKinnon 2010).
  • The subcluster bootstrap (MacKinnon and Webb 2018).
  • Non-bootstrapped Wald, Rao, and Anderson-Rubin tests, optionally with multiway clustering.
  • Confidence intervals formed by inverting the test and iteratively searching for bounds.
  • Multiway clustering.
  • Arbitrary and multiple linear hypotheses in the parameters.
  • Maintained linear constraints on the model (restricted OLS, IV/2SLS/LIML).
  • One-way fixed effects.
  • Generation of data for plotting of confidence curves or surfaces after one- or two-dimensional hypothesis tests.

WildBootTests.jl incorporates order-of-magnitude algorithmic speed-ups developed since Roodman et al. (2019) for OLS and IV/2SLS. And it exploits the efficiency of Julia, for example by offering single-precision (Float32) computation.

The interface is low-level: the exported function wildboottest() accepts scalars, vectors, and matrices, not DataFrames or results from estimation functions such as lm(). This design minimizes the package's dependency footprint while making the core functionality available to multiple programming environments, including Julia, R (through JuliaConnectoR), and Python (through PyJulia). A separate package will provide a higher-level Julia interface.

wildboottest() accepts many optional arguments. Most correspond to options of the Stata package boottest, which are documented in Roodman et al. (2019), §7. Julia-specific additions include an optional first argument T, which can be Float32 or Float64 to specify the precision of computation; and rng, which takes a random number generator such as MersenneTwister(2302394).

On latency

The first time you run wildboottest() in a session, Julia's just-in-time compilation will take ~10 seconds. The same will happen the first time you switch between Float32 and Float64 calculations, or between OLS and IV/2SLS estimation.