common_support_strata2: Establishes Common Support and joins with the data.

View source: R/common_support_strata.R

common_support_strata2R Documentation

Establishes Common Support and joins with the data.

Description

Establishes Common Support and joins with the data.

Usage

common_support_strata2(data, treatment, variables, y, weights = NULL)

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

Value

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 Also

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.

Examples

data(invented_wages)
common_support_strata2(invented_wages, treatment = "gender",
                       variables = c("sector", "education"),
                       y = "wage", weights = "sample_weights")


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