Releases: s3alfisc/fwildclusterboot
fwildclusterboot v0.6
fwildclusterboot 0.6
-
Bug fix: for one-sided hypotheses for the WRU bootstrap (if impose_null = FALSE), the returned p-values were incorrect - they were reported as 'p', but should have been '1-p'. E.g. if the reported p-values was reported as 0.4, it should have been reported as 0.6.
-
A new function argument
ssc
gives more control over the small sample adjustments made withinboottest()
. It closely mirrors thessc
argument infixest
. The only difference is thatfwildclusterboot::boot_ssc()'s
fixef.K
argument currently has only one option,'none'
, which means that the fixed effect parameters are discarded when calculating the number of estimated parameters k.
The default argument ofboot_ssc()
areadj = TRUE, fixef.K = "none", cluster.adj = TRUE
andcluster.df = "conventional"
. In fixest, thecluster.df
argument is"min"
by default.
Prior to v 0.6, by default, no small sample adjustments regarding the sample size N and the number of estimated parameters k were applied. The changes in v0.6 may slightly affect the output ofboottest()
. For exact reproducibility of previous results, setadj = FALSE
. Settingadj = TRUE
will not affect p-values and confidence intervals for oneway clustering, but the internally calculated t-stat, which is divided by$\sqrt{(N-k)/(N-1)}$ . For twoway clustering, it might affect the number and order of invalid bootstrapped t-statistics (due to non-positive definite covariance matrices) and, through this channel, affect bootstrapped inferential parameters. -
Testing: unit tests are now run on github actions against wildboottestjlr, which is a JuliaConnectoR based wrapper around WildBootTests.jl, a Julia implementation of the fast wild cluster bootstrap algorithm.
-
Additionally, minor speed tweaks.
v 0.5.1
- Fix a bug with Mammen weights introduced in version 0.5 -> switch back to
sample()
function. To guarantee reproducibilty with Mammen weights, either a seed needs to be specified inboottest()
or a global seed needs to be set viaset.seed()
. - Delete some unnecessary computations from boot_algo2() -> speed improvements
- For B = 2^(#number of clusters), Rademacher weights should have been enumerated -
instead, they were drawn randomly and enumeration only occured for B > 2^(#number of clusters). Now, enumeration occurs if B >= 2^(#number of clusters).
fwildclusterboot 0.5
- Version 0.5 fixes an error for the bootstrap with weighted least squares introduced with version 0.4. All unit tests
that compare fwildclusterboot with weighted least squares results from boottest.stata pass. In particular, enumerated cases pass with exact equality (in such cases, the bootstrap weights matrices are exactly identical in both R and Stata). boottest()
now stops iffixest::feols()
deletes non-NA values (e.g. singleton fixed effects deletion) and asks the user to delete such rows prior to estimation viafeols()
&boottest()
. Currently,boottest()'s
pre-processing cannot handle such deletions - this remains future work.- To align
fwildclusterboot
with Stata's boottest command (Roodman et al, 2019), Mammen weights are no longer enumerated infwildclusterboot::boottest()
. boottest()
no longer sets an internal seed (previously set.seed(1)) if no seed is provided as a function argument.- Sampling of the bootstrap weights is now powered by the
dqrng
package, which speeds up the creation of the bootstrap weights matrix. To set a "global" seed, one now has use thedqset.seed()
function from thedqrng package
, which is added as a dependency.
fwildclusterboot 0.4
fwilclusterboot 0.4
- New feature I:
boottest()
now allows for univariate tests that involve multiple
variables. E.g. one can now test hypothesis as ´var1 + var2 = c´ where c is a scalar. More details on the syntax can be found in the vignette. All methods of for objects of classboottest
have been updated. - New feature II:
boottest()
now also supports "equal-tailed" p-values and one-sided hypotheses. For one-sided tests, confidence intervals are currently not supported. - Internal changes: To allow for multivariable tests, the
boot_algo2()
function has slightly been modified.invert_p_val2()
is superseded byinvert_p_val()
. - Further, a CRAN error is fixed - two tests for exact equality failed with relative difference e-03 on openBLAS. In consequence, all exact tests are set to reltol = 1e-02.
fwildclusterboot 0.3.7
- Bug fix: the output of
boottest()
varied depending on the class of the
input fixed effects for regressions both vialfe::felm()
andfixest::feols()
.
This bug occurred becauseboottest()
does not work with a pre-processed model.frame object from eitherfelm()
orfeols()
but works with the original input data. While bothfelm()
andfeols()
change non-factor fixed effects variables to factors internally,boottest()
did not check but implicitely assumed that all fixed effects used in the regression models are indeed factors in the original data set. As a consequence, if one or more fixed effects were e.g. numeric,boottest()
would produce incorrect results without throwing an error.
With version 0.3.7,boottest()
checks internally if all variables in the original data set which are used as fixed effects are factor variables and if not, changes them to factors.
Thanks for timotheedotc for raising the issue on github, which can be found here: #14. - Some tests have been added that compare output from
boottest()
with the wild cluster bootstrap implemented viaclusterSEs
.
fwildclusterboot 0.3.6
- small fixes of CRAN bugs related to packages in "suggests"
fwildclusterboot 0.3.5
-
Bug fix: For Rademacher and Mammen weights and cases where (2^ number of clusters) < # boostrap iterations,
(deterministic ) full enumeration should have been employed for sampling the bootstrap weights.
If (2^ number of clusters) < # boostrap iterations,boottest()
would internally overwrite the user-provided number of bootstrap iterations
to B := (2^ number of clusters) . The bug now occured because the bootstrap weights were drawn randomly and with replacement instead of using full enumeration and drawing all distinct draws exactly once.
Thanks to fschoner for finding the bug! see github issue #11 -
Bug fix: A small bug has been fixed related to missing values in the cluster variables.
-
By default,
boottest()
now sets an internal seed if no seed is provided by
the user via theseed
function argument. -
Several improvements to the documentation.
fwildclusterboot 0.3.4
- fixes a small bug in the vignette that caused errors on CRAN
fwildclusterboot 0.3.3
- implements full enumeration for Rademacher & Mammen Weights if 2^k < B, where k is the number of clusters and B the number of bootstrap iterations
fwildclusterboot 0.3.2
- minor bug fixes in unit tests