Changelog
Source:NEWS.md
fwb
0.5.0
CRAN release: 2025-07-08
Added a new confidence interval type for
confint()
,fwb.ci()
, andsummary()
:"wald"
, for Wald-type confidence intervals that don’t correct for any bias.When p-values are requested in
summary()
, they are now based on inverting the confidence interval. This ensures hypothesis testing using the confidence interval and using p-values yield the same conclusion. Previously, they were based on inverting the Wald confidence interval only (i.e., a standard z-test).The null value of the estimates for the hypothesis tests in
summary()
can now be supplied using thenull
argument.Simultaneous inference via the sup-t confidence band and its inversion are now supported by
summary()
andconfint()
by settingsimultaneous = TRUE
. This is only supported for percentile and Wald confidence intervals (and the latter requires themvtnorm
package to be installed).Added new function
fwb.array()
to extract the bootstrap weights from anfwb
object.Confidence intervals can be suppressed in
summary()
by settingconf = 0
.Fixed a bug in
confint()
,fwb.ci()
, andsummary()
where the confidence level could only be as low as .5. Now levels as low as just above 0 are allowed, except for when computing simultaneous Wald confidence intervals.BCa confidence intervals are computed faster in
confint()
andsummary()
. These functions no longer usefwb.ci()
internally.Added a new
tidy()
method forsummary.fwb
objects.
fwb
0.4.0
CRAN release: 2025-06-11
Added a suite of new functions for computing weighted statistic and transformations that automatically incorporate the bootstrap weights. These include
w_mean()
,w_var()
,w_sd()
,w_quantile()
, andw_median()
for computing weighted means, variances, standard deviations, quantiles, and medians;w_cov()
andw_cor()
for computing weighted covariance and correlation matrices, andw_std()
,w_scale()
, andw_center()
for transforming variables by standardizing, scaling, and centering using weighted statistics. These work when called inside the function supplied to thestatistic
argument offwb()
or inside the model that is supplied tovcovFWB()
.Improved some error messages.
Fixed a bug in
print.fwbci()
due to incorrect ordering of the intervals which led them to be printed with incorrect labels. These have been corrected and printing is a little prettier. Thanks to Katya Zelevinsky.Documentation and vignette updates.
Added new tests.
fwb
0.3.0
CRAN release: 2025-03-03
Added a new
confint()
method forfwb
objects.Added a new
strata
argument tofwb()
to perform stratified bootstrapping within levels of a stratification variable.Added a new
drop0
argument tofwb()
to drop all units with weights of 0 in each bootstrap iteration.Added a new
.coef
argument tovcovFWB()
. A function can be supplied to extract a vector of coefficients from the fitted model in each bootstrap iteration if the default (stats::coef()
) doesn’t return a numeric vector (e.g., fornnet::multinom()
models). An error message is now thrown if.coef
doesn’t return a numeric vector.Added support for using
future
backend forfwb()
by supplyingcl = "future"
. Thanks to Katya Zelevinsky for the suggestion.Added a new vignette on reproducibility and parallelization, which can be accessed at
vignette("fwb-rep")
.For
fwb()
,simple
has a new default that isTRUE
in most cases andFALSE
whenwtype
is"multinom"
. This should not affect results but will reduce memory use for large datasets by avoiding computing all bootstrap weights simultaneously. Note that when there is randomness in thestatistic
supplied tofwb()
, the argument tosimple
affects whether BCa confidence intervals can be computed. See the reproducibility vignette mentioned above for details.A warning is now thrown when using
fwb()
withsimple = TRUE
with non-NULL
cl
when the random number generator kind is not"L'Ecuyer-CMRG"
. Under these circumstances, results may not replicate and the BCa confidence interval will be inaccurate. See the reproducibility vignette mentioned above for details.Fixed a bug where the names of quantities produced by
fwb()
whenstatistic
returns an unnamed vector were incorrect.When BCa confidence intervals are requested, an error is thrown if the number of bootstrap replications is smaller than the sample size.
Documentation updates.
fwb
0.2.0
CRAN release: 2023-12-07
fwb()
andvcovFWB()
now take an additional argument,wtype
, which specifies how the weights are drawn. The default,"exp"
is still to draw weights from an distribution but other options, namely"multinom"
for multinomial integer weights (which reproduceboot::boot()
results exactly),"poisson"
for Poisson integer weights, and"mammen"
for second-order accurate Mammen weights as recommended by Lihua Lei here. (#4)New functions
set_fwb_wtype()
andget_fwb_wtype()
allow one to set global defaults for thewtype
argument offwb()
and vcovFWB()`.