bootstrap_estimate_ob_decompose {ddecompose}R Documentation

Bootstrapping the OB decomposition

Description

The function resamples observations and restimates the OB decomposition with the new sample.

Usage

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,
  ...
)

Arguments

formula_decomposition

formula object that contains the formula for the decomposition

formula_reweighting

formula object that contains the formula for the reweighting in case of a reweighted decompostion

data_used

data.frame with data used for estimation (including weight and group variable)

group

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.

reference_0

boolean: indicating if group 0 is the reference group and if its coefficients are used to compute the counterfactual mean.

normalize_factors

boolean: If 'TRUE', then factor variables are normalized as proposed by Gardeazabal/Ugidos (2004)

reweighting

boolean: if 'TRUE', then the decomposition is performed with with respect to reweighted reference group.

reweighting_method

specifies the method fit and predict conditional probabilities used to derive the reweighting factor. Currently, "logit", "fastglm", and "random_forest" are available.

trimming

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.

trimming_threshold

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.

rifreg

boolean: if 'TRUE', then RIF decomposition is performed

rifreg_statistic

string containing the distributional statistic for which to compute the RIF.

rifreg_probs

a vector of length 1 or more with probabilities of quantiles.

custom_rif_function

the RIF function to compute the RIF of the custom distributional statistic.

na.action

generic function that defines how NAs in the data should be handled.

cluster

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


[Package ddecompose version 1.0.0 Index]