View source: R/common_support_strata.R
common_support_strata2 | R Documentation |
Establishes Common Support and joins with the data.
common_support_strata2(data, treatment, variables, y, weights = NULL)
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 |
a data frame with the same number of rows of the starting data, with columns of the chosen treatment
, variables
, y
, weights
, common_support
(TRUE/FALSE) and strata
(a strata is given by a certain combination of the modalities of the variables)
See common_support2
, which is used by this function to establish common support.
See fhat_strata2
and reweight_strata2
, that do the next steps.
See reweight_strata_all2
that does all the steps of common_support_strata2
,
fhat_strata2
and reweight_strata2
.
data(invented_wages)
common_support_strata2(invented_wages, treatment = "gender",
variables = c("sector", "education"),
y = "wage", weights = "sample_weights")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.