dec_quantile | R Documentation |
The results in the common support are all the components necessary to perform a decomposition of the quantile wage difference between two groups, in two components: one that can be explained by the difference in the distributions of characteristics between the two groups (delta_X), and one that cannot be explained by the different characteristics of the two groups (delta_S).
dec_quantile(...)
## Default S3 method:
dec_quantile(.reweight_strata_all, y = NULL, weights = NULL, probs = 0.5, ...)
## S3 method for class 'reweighted'
dec_quantile(.reweighted, ...)
... |
arguments passed to or from other methods. |
.reweight_strata_all |
output of |
y |
name of the outcome variable for which you want to make the decomposition. If NULL (default), the value is inherited from the attributes of |
weights |
name of the weight variable (sample weights). If NULL (default), the value is inherited from the attributes of |
probs |
numeric vector of length one with the desired quantile level (should be between 0 and 1). |
.reweighted |
an object of class |
A data frame with four, five or six rows, with the following columns:
the name of the treatment column used in reweight_strata_all2
;
common_support
logical indicating if in or out the common support;
yhat
quantile of the y variable, weighted by the given weights;
yhat_C_A
counterfactual quantile y of group A as if they had the same distribution of characteristics of group B. This is computed in the common support only and for group A individuals. It is computed with the weights w_AB
that result from reweight_strata_all2
;
yhat_C_B
counterfactual quantile y of group B as if they had the same distribution of characteristics of group A. This is computed in the common support only and for group B individuals. It is computed with the weights w_BA
that result from reweight_strata_all2
;
Nhat
estimate of the number of individuals.
probs
the level of the estimated quantile. Should be a number between zero and one (default: 0.5: the median).
The number of rows is given by the combinations of the distinct values of
the first two columns: treatment
and common_support
.
In addition to these rows, there are two more rows at the end, with the
marginal quantiles of the two groups.
In the "typical" case, the resulting data frame will have 4 rows. It can have three rows if all the individuals of one group are in the common support.
In case of no common support or no out-of-support, the data frame will have two rows.
data(invented_wages)
# Common support and computation of counterfactual weights
r00 <- reweight_strata_all2(invented_wages, treatment = "gender",
variables = c("sector", "education"),
y = "wage", weights = "sample_weights")
# Computation of the elements necessary to the decomposition
dec_quantile(r00)
dec_quantile(r00, probs = 0.75)
data(invented_wages)
r00 <- reweight_strata_all4(invented_wages, treatment = "gender",
variables = c("sector", "education"),
y = "wage", weights = "sample_weights")
str(r00)
names(r00)
class(r00)
dec_median(r00)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.