diff --git a/R/boottest_felm.R b/R/boottest_felm.R index 9357cf2a..fbf17735 100644 --- a/R/boottest_felm.R +++ b/R/boottest_felm.R @@ -421,6 +421,12 @@ boottest.felm <- function(object, } } } + + check_engine_btype( + engine = engine, + bootstrap_type = bootstrap_type + ) + if (!is.null(beta0)) { rlang::abort( @@ -454,14 +460,18 @@ boottest.felm <- function(object, if (is.null(clustid)) { heteroskedastic <- TRUE - if (engine == "R") { + if (engine %in% c("R", "WildBootTests.jl")) { # heteroskedastic models should always be run through R-lean engine <- "R-lean" + rlang::inform( + "The heteroskedastic bootstrap is only supported for `engine = 'R-lean'`, + Resetting the engine argument to 'R-lean'." + ) + } else { + heteroskedastic <- FALSE } - } else { - heteroskedastic <- FALSE } - + check_bootstrap_types( param = param, bootstrap_type = bootstrap_type diff --git a/R/boottest_fixest.R b/R/boottest_fixest.R index d3554b81..833cb8f6 100644 --- a/R/boottest_fixest.R +++ b/R/boottest_fixest.R @@ -431,7 +431,12 @@ boottest.fixest <- function(object, } } } - + + check_engine_btype( + engine = engine, + bootstrap_type = bootstrap_type + ) + if (!is.null(beta0)) { rlang::abort( c( @@ -481,14 +486,18 @@ boottest.fixest <- function(object, if (is.null(clustid)) { heteroskedastic <- TRUE - if (engine == "R") { + if (engine %in% c("R", "WildBootTests.jl")) { # heteroskedastic models should always be run through R-lean engine <- "R-lean" + rlang::inform( + "The heteroskedastic bootstrap is only supported for `engine = 'R-lean'`, + Resetting the engine argument to 'R-lean'." + ) + } else { + heteroskedastic <- FALSE } - } else { - heteroskedastic <- FALSE } - + check_bootstrap_types( param = param, bootstrap_type = bootstrap_type diff --git a/R/boottest_lm.R b/R/boottest_lm.R index 4e310e74..0e2a605f 100644 --- a/R/boottest_lm.R +++ b/R/boottest_lm.R @@ -383,7 +383,7 @@ boottest.lm <- function(object, engine = engine, bootstrap_type = bootstrap_type ) - + if (!is.null(beta0)) { rlang::abort( c( @@ -413,14 +413,18 @@ boottest.lm <- function(object, if (is.null(clustid)) { heteroskedastic <- TRUE - if (engine == "R") { + if (engine %in% c("R", "WildBootTests.jl")) { # heteroskedastic models should always be run through R-lean engine <- "R-lean" + rlang::inform( + "The heteroskedastic bootstrap is only supported for `engine = 'R-lean'`, + Resetting the engine argument to 'R-lean'." + ) + } else { + heteroskedastic <- FALSE } - } else { - heteroskedastic <- FALSE } - + check_bootstrap_types( param = param, bootstrap_type = bootstrap_type diff --git a/R/onLoad.R b/R/onLoad.R index fb1d7702..c83b060b 100644 --- a/R/onLoad.R +++ b/R/onLoad.R @@ -17,10 +17,10 @@ .onAttach <- function(libname, pkgname) { - packageStartupMessage("Note that with version 0.15, rademacher weights are") + packageStartupMessage("\nNote that with version 0.15, rademacher weights are") packageStartupMessage("drawn from `dqrng::dqrrademacher()` instead of `dqrng::dqsample()`.") packageStartupMessage("This brings nice performance gains, but you might no longer be able to exactly reproduce") - packageStartupMessage("your bootsrap inferences under a given seed. If this is a ") + packageStartupMessage("your bootstrap inferences under a given seed. If this is a ") packageStartupMessage("requirement for you, please revert to `fwildclusterboot` version") packageStartupMessage("0.13-0.14.3.")