Skip to contents

Control units receive weight 1; treated units receive \(w_i = (1-\hat{e}(X_i))/\hat{e}(X_i)\).

Usage

morie_estimate_atc(data, treatment, outcome, covariates, propensity_col = NULL)

Arguments

data

A data frame.

treatment

Name of the binary treatment column.

outcome

Name of the outcome column.

covariates

Character vector of covariate names.

propensity_col

Optional: name of a pre-computed propensity score column.

Value

Named list: atc, se, ci_lower, ci_upper, n_control.

Details

Propensity-score estimation delegates to WeightIt when installed (via morie_estimate_propensity_scores); the weighted-difference and influence-function SE run inline.

Examples

set.seed(1)
df <- data.frame(t = rbinom(200, 1, 0.4), y = rnorm(200), x = rnorm(200))
morie_estimate_atc(df, "t", "y", "x")
#> $atc
#> [1] -0.0436899
#> 
#> $se
#> [1] 0.1409637
#> 
#> $ci_lower
#> [1] -0.3199788
#> 
#> $ci_upper
#> [1] 0.232599
#> 
#> $n_control
#> [1] 117
#>