mboottest | R Documentation |
mboottest
is a S3 method that allows for arbitrary linear
hypothesis testing
for objects of class lm, fixest, felm
mboottest(object, ...)
object |
An object of type lm, fixest or felm |
... |
other arguments |
An object of class mboottest
.
To guarantee reproducibility, you can either use boottest()'s
seed
function argument, or
set a global random seed via
set.seed()
when using
the lean algorithm (via engine = "R-lean"
),
the heteroskedastic wild bootstrap
the wild cluster bootstrap via engine = "R"
with Mammen weights or
engine = "WildBootTests.jl"
dqrng::dqset.seed()
when using engine = "R"
for Rademacher,
Webb or Normal weights
Roodman et al., 2019, "Fast and wild: Bootstrap inference in STATA using boottest", The STATA Journal. (https://ideas.repec.org/p/qed/wpaper/1406.html)
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.
Cameron, A.Colin & Douglas L. Miller. "A practitioner's guide to cluster-robust inference" Journal of Human Resources (2015) \Sexpr[results=rd]{tools:::Rd_expr_doi("doi:10.3368/jhr.50.2.317")}
Davidson & MacKinnon. "Wild Bootstrap Tests for IV regression" Journal of Economics and Business Statistics (2010) \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1198/jbes.2009.07221")}
MacKinnon, James G., and Matthew D. Webb. "The wild bootstrap for few (treated) clusters." The Econometrics Journal 21.2 (2018): 114-135.
MacKinnon, James G., and Matthew D. Webb. "Cluster-robust inference: A guide to empirical practice" Journal of Econometrics (2022) \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1016/j.jeconom.2022.04.001")}
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.
mboottest.lm mboottest.felm mboottest.fixest
## Not run:
requireNamespace("clubSandwich")
R <- clubSandwich::constrain_zero(2:3, coef(lm_fit))
wboottest <-
mboottest(
object = lm_fit,
clustid = "group_id1",
B = 999,
R = R
)
summary(wboottest)
print(wboottest)
nobs(wboottest)
pval(wboottest)
generics::tidy(wboottest)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.