The function resamples observations and restimates the OB decomposition with the new sample.
bootstrap_estimate_ob_decompose(
formula_decomposition,
formula_reweighting,
data_used,
group,
reference_0,
normalize_factors,
reweighting,
reweighting_method,
trimming,
trimming_threshold,
rifreg,
rifreg_statistic,
rifreg_probs,
custom_rif_function,
na.action,
cluster = NULL,
...
)
formula
object that contains the formula for the decomposition
formula
object that contains the formula for
the reweighting in case of a reweighted decompostion
data.frame
with data used for estimation (including weight and group variable)
name of the a binary variable (numeric or factor) identifying the two groups that will be compared. The group identified by the lower ranked value in `group` (i.e., 0 in the case of a dummy variable or the first level of factor variable) is defined as group 0.
boolean: indicating if group 0 is the reference group and if its coefficients are used to compute the counterfactual mean.
boolean: If `TRUE`, then factor variables are normalized as proposed by Gardeazabal/Ugidos (2004)
boolean: if `TRUE`, then the decomposition is performed with with respect to reweighted reference group.
specifies the method fit and predict conditional probabilities
used to derive the reweighting factor. Currently, "logit"
, "fastglm"
,
and "random_forest"
are available.
boolean: If TRUE
, observations with dominant reweighting factor
values are trimmend according to rule of Huber, Lechner, and Wunsch (2013). Per
default, trimming is set to FALSE
.
numeric: threshold defining the maximal accepted
relative weight of the reweighting factor value (i.e., inverse probability weight)
of a single observation. If NULL
, the threshold is set to \(sqrt(N)/N\),
where \(N\) is the number of observations in the reference group.
boolean: if `TRUE`, then RIF decomposition is performed
string containing the distributional statistic for which to compute the RIF.
a vector of length 1 or more with probabilities of quantiles.
the RIF function to compute the RIF of the custom distributional statistic.
generic function that defines how NAs in the data should be handled.
numeric vector of same length as dep_var
indicating the
clustering of observations. If cluster = NULL
(default), no clustering
is a assumend and bootstrap procedure resamples individual observations. Otherwise
bootstrap procedure resamples clusters.
additional parameters passed to custom_rif_function