cobalt
News and
Updatesfwb
0.3.0Added a new confint()
method for fwb
objects.
Added a new strata
argument to fwb()
to
perform stratified bootstrapping within levels of a stratification
variable.
Added a new drop0
argument to fwb()
to
drop all units with weights of 0 in each bootstrap iteration.
Added a new .coef
argument to
vcovFWB()
. 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., for nnet::multinom()
models). An error message is
now thrown if .coef
doesn’t return a numeric
vector.
Added support for using future
backend for
fwb()
by supplying cl = "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 is TRUE
in most cases and FALSE
when
wtype
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 the statistic
supplied to fwb()
,
the argument to simple
affects whether BCa confidence
intervals can be computed. See the reproducibility vignette mentioned
above for details.
A warning is now thrown when using fwb()
with
simple = 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()
when statistic
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.0fwb()
and vcovFWB()
now take an
additional argument, wtype
, which specifies how the weights
are drawn. The default, "exp"
is still to draw weights from
an \(\text{Exp}(1)\) distribution but
other options, namely "multinom"
for multinomial integer
weights (which reproduce boot::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()
and
get_fwb_wtype()
allow one to set global defaults for the
wtype
argument of fwb()
and
vcovFWB()`.
fwb
0.1.2fwb
0.1.1Fixed bugs related to the index
argument of various
functions, including bugs when the estimated quantity is not given a
name.
Some error messages may be clearer.
fwb
0.1.0