reweight_strata2: Computes the adjustment factors to estimate counterfactuals...

View source: R/reweight_strata.R

reweight_strata2R Documentation

Computes the adjustment factors to estimate counterfactuals (in the common support).

Description

Adjustment factors are used to reweight the joint distribution of characteristics of one group so that it will be equal to that of the other group (both counterfacuals, AB and BA...). This will be done on the common support only.

Usage

reweight_strata2(.fhat_strata)

Arguments

.fhat_strata

output of fhat_strata2

Value

a data frame with the strata in the common support (in the rows), the reweighting factors rw_BA and rw_AB (see below), and joint frequencies of the strata in the two groups (f_A and f_B).

Details about the columns of the returned data frame:

strata

Unique combinations of the modalities of the variables used in common_support_strata2 (and common_support2). In this function, the strata are only those on the common support (that is, where there exists at least one observation of each group - A and B).

rw_BA

This is the reweighting factor which has to be given to group B such that the distribution of their characteristics will be the same as that of group A. This is computed, in each strata, as f_A / f_B.

rw_AB

This is the reweighting factor which has to be given to group A such that the distribution of their characteristics will be the same as that of group B. This is computed, in each strata, as f_B / f_A.

f_A

estimated frequencies of strata for group A (in the common support).

f_B

estimated frequencies of strata for group B (in the common support).

See Also

fhat_strata2, whose result is the input of this function. See reweight_strata_all2, that uses internally functions common_support_strata2, fhat_strata2 and reweight_strata2.

Examples

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

f00 <- fhat_strata2(c00)
reweight_strata2(f00)


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