propensity_strat_ate: Estimate average treatment effect (ATE) with propensity score...

Description Usage Arguments Details Value References Examples

View source: R/ate.R

Description

Estimate average treatment effect (ATE) with propensity score stratification.

Usage

1
propensity_strat_ate(data, y, w, p, n_strata = 4, min_obs = 1, model = "naive")

Arguments

data

a dataframe object containing the variables and values.

y

a character vector specifying the response variable.

w

a character vector specifying the treatment status.

p

a vector containing propensity score values.

n_strata

the number of strata to use when splitting propensity scores. Default: 4

min_obs

Minimum number of observations per strata. If this is specified as a valid nontrivial number (greater than 1, less than non NA data size), then n_strata will be set to the minimum of the specified n_strata, and the n_strata such that min_obs is satisfied.

model

a model to estimate ATE (one of "naive", "ipw", "weighted ols", or "aipw")

Details

Estimates average treatment effects across different groups of propensity scores specified by the user (either with a minimum number of observations in a strata or number of strata). The user can also specify the method of estimation.

The naive estimator is given by:

τ = E[Y_i | W = 1] - E[Y_i | W = 0].

The inverse propensity score weighting estimator is given by:

τ = E ≤ft[ \frac{Y_i W_i}{e(X_i)} - \frac{Y_i (1 - W_i)}{1 - e(X_i)} \right]

where e(X_i) = P(W_i = 1 | X_i = x) is the propensity score.

The weighted OLS model is a regression with weights given by:

w_i = \frac{W_i}{e(X_i)} - \frac{1 - W_i}{1 - e(X_i)}

where e(X_i) = P(W_i = 1 | X_i = x) is the propensity score.

Finally, the augmented inverse propensity score weighted method is given by:

τ = E ≤ft[ W_i \frac{Y_i-τ(1,X_i)}{e(X_i)} + (1-W_i) \frac{Y_i-τ(0,X_i)}{1-e(X_i)} + τ(1,X_i) - τ(0,X_i)\right]

where e(X_i) = P(W_i = 1 | X_i = x) is the propensity score and τ(1, X_i) and τ{0, X_i} are estimated in the first stage via OLS regression.

More details on each of these functions can be found in their individual estimators. The ATE is given by the average of the estimates over the strata:

\frac{1}{n}∑_{i=1}^{n}τ_i where τ_i is the average treatment effect estimated in strata i and n is the number of strata specified by the user (or calculated with the minimum number of observations per strata specified).

Value

numeric estimate of the average treatment effect.

References

Rosenbaum, Paul, and Donald Rubin. 1984. “Reducing Bias in Observational Studies Using Subclassification on the Propensity Score." Journal of the American Statistical Association. Vol. 79(387), Feb. pgs 516-524.

Lunceford JK, Davidian M. 2004. “Stratification and weighting via the propensity score in estimation of causal treatment effects: a comparative study." Statistics in Medicine. Vol. 23(19), Aug., pgs. 2937–2960. https://doi.org/10.1002/sim.1903

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data("lalonde")

# calculate propensity scores
p <- propensity_score(lalonde, y = "re78", w = "treat", model = "logistic")
ate <- propensity_strat_ate(data = lalonde, 
                            y = "re78", 
                            w = "treat",
                            p = p, 
                            n_strata = 4, 
                            min_obs = 1)

jackcollison/causality documentation built on Dec. 20, 2021, 8:05 p.m.