Skip to contents

boottest is a S3 method that allows for fast wild cluster bootstrap inference for objects of class lm, fixest and felm by implementing the fast wild bootstrap algorithm developed in Roodman et al., 2019.


boottest(object, ...)



An object of type lm, fixest, felm or ivreg


other arguments


An object of class boottest.

Setting Seeds

To guarantee reproducibility, you can either use boottest()'s seed function argument, or set a global random seed via

  • set.seed() when using

    1. the lean algorithm (via boot_algo = "R-lean"), 2) the heteroskedastic wild bootstrap

    2. the wild cluster bootstrap via boot_algo = "R" with Mammen weights or 4) boot_algo = "WildBootTests.jl"

  • dqrng::dqset.seed() when using boot_algo = "R" for Rademacher, Webb or Normal weights


Roodman et al., 2019, "Fast and wild: Bootstrap inference in STATA using boottest", The STATA Journal. (

Cameron, A. Colin, Jonah B. Gelbach, and Douglas L. Miller. "Bootstrap-based improvements for inference with clustered errors." The Review of Economics and Statistics 90.3 (2008): 414-427.

MacKinnon, James G., and Matthew D. Webb. "The wild bootstrap for few (treated) clusters." The Econometrics Journal 21.2 (2018): 114-135.

MacKinnon, James. "Wild cluster bootstrap confidence intervals." L'Actualite economique 91.1-2 (2015): 11-33.

Webb, Matthew D. Reworking wild bootstrap based inference for clustered errors. No. 1315. Queen's Economics Department Working Paper, 2013.