fhat_strata2: Estimates empirical joint frequencies of strata, in and out...

View source: R/fhat_strata.R

fhat_strata2R Documentation

Estimates empirical joint frequencies of strata, in and out of the common support.

Description

Estimates empirical joint frequencies of strata, in and out of the common support.

Usage

fhat_strata2(.cs_strata)

Arguments

.cs_strata

the output of common_support_strata2

Value

a data frame with number of rows equal to the number of strata multiplied by 2 (for each group), with the following columns:

  • strata character vector with the combinations of the modalities of the considered variables;

  • name of the column used as the binary treatment;

  • common_support logical that indicates wether the strata is in or out the common support;

  • Nhat estimate of the number of individuals in the strata;

  • fhat estimate of the relative frequency of the strata for each group, in and out the common support;

  • fhat_groups estimate of the relative frequency of the strata for each group (without the distinction of in and out the common support).

See Also

common_support_strata2, whose result is the input of this function. See reweight_strata2, that takes the result of this function as its input.

Examples

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

fhat_strata2(c00)


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