This function performs the DFL decomposition. It derives the reweighting factors, estimates the distributional statistics and calculates the decomposition terms.
dfl_decompose_estimate(
formula,
dep_var,
data_used,
weights,
group_variable,
reference_group,
method,
estimate_statistics,
statistics,
probs,
custom_statistic_function,
right_to_left,
trimming,
trimming_threshold,
return_model,
estimate_normalized_difference,
...
)
formula
object
dependent variable
data.frame
with data used for estimation
weights variable
group variable
reference_group to be reweighted
method used to estimate conditional probabilities
boolean: if TRUE
(default), then distributional
statistics are estimated and the decomposition is performed. If FALSE
,
the function only returns the fitted inverse propensity weights.
a character vector that defines the distributional statistics for which the decomposition is performed.
a vector of length 1 or more with the probabilities of the quantiles to be estimated.
a function estimating a custom distributional statistic that will be decomposed.
determines the direction of a sequential decomposition.
boolean: If TRUE
, observations with dominant reweighting factor
values are trimmed according to rule of Huber, Lechner, and Wunsch (2013).
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
(default), the object(s) of the model
fit(s) used to predict the conditional probabilities for the reweighting factor(s)
are returned.
boolean: If TRUE
(default), the
normalized differences between the covariate means of the comparison group and the
reweighted reference group are calculated.
other parameters passed to the function estimating the conditional probabilities.