boot_dec_quantile: Bootstrap of the quantile decomposition procedure.

View source: R/ZZ_bootstrap.R

boot_dec_quantileR Documentation

Bootstrap of the quantile decomposition procedure.

Description

Bootstrap estimates of dec_quantile and dec_. This serves to estimate for example confidence intervals of each component of the decomposition.

Usage

boot_dec_quantile(
  data,
  treatment,
  variables,
  y,
  weights = NULL,
  R = 10,
  probs = 0.5,
  counterfactual = c("AB", "BA"),
  ...
)

Arguments

data

data frame

treatment

column name of the binary variable

variables

character vector of the variables' names, for which the common support has to be established

y

name of the outcome variable for which you want to make the decomposition

weights

name of the weight variable (sample weights). If NULL (default value) it uses equal weights for all observations, adding a column of ones

R

The number of bootstrap replicates. This will be a single positive integer.

probs

numeric vector of length one with the desired quantile level (should be between 0 and 1).

counterfactual

"AB" or "BA". "AB" means that we want to estimate the counterfactual (wage) of group A, as if their characteristics were distributed as in group B. "BA" is the opposite (characteristics of group B are balanced to those of group A).

...

other arguments passed on to boot.

Examples

## Not run: 
data(invented_wages)
b01 <- boot_dec_quantile(data = invented_wages, treatment = "gender",
                        variables = c("sector", "education"), y = "wage",
                        R = 500, probs = 0.5)

## End(Not run)


gibonet/decr documentation built on Jan. 5, 2024, 7:26 a.m.