Skip to contents

Uses n_folds cross-fitting: propensity (logistic ridge) and outcome regression (OLS separately for D=1 and D=0) are fit on K-1 folds and predicted on the held-out fold. The doubly-robust influence function (Robins-Rotnitzky-Zhao 1994) is averaged to yield the ATE.

Usage

morie_otis_aipw_ate(
  df,
  treatment,
  outcome,
  covariates,
  n_folds = 5L,
  seed = 123L,
  eps = 0.02
)

Arguments

df

A data frame containing treatment, outcome, and all covariates.

treatment

Name of the binary treatment column.

outcome

Name of the (numeric) outcome column.

covariates

Character vector of covariate names.

n_folds

Number of cross-fitting folds (default 5).

seed

Integer seed for the fold partition (default 123).

eps

Propensity clip bound (default 0.02).

Value

A morie_causal_estimate list.

References

Robins, J. M., Rotnitzky, A., & Zhao, L. P. (1994). JASA 89(427), 846-866.

Examples

set.seed(1)
n <- 300L
x <- rnorm(n)
d <- rbinom(n, 1, plogis(0.4 * x))
y <- 0.5 * d + x + rnorm(n)
df <- data.frame(d = d, y = y, x = x)
morie_otis_aipw_ate(df, treatment = "d", outcome = "y",
                    covariates = "x", n_folds = 3L)
#> $estimator
#> [1] "AIPW"
#> 
#> $ate
#> [1] 0.4914376
#> 
#> $ate_se
#> [1] 0.1404857
#> 
#> $ate_pval
#> [1] 0.0004685302
#> 
#> $ate_ci95
#> [1] 0.2160855 0.7667897
#> 
#> $n
#> [1] 300
#> 
#> $n_treated
#> [1] 144
#> 
#> $p_treat
#> [1] 0.48
#> 
#> $notes
#> $notes[[1]]
#> [1] "cross-fit folds=3"
#> 
#> $notes[[2]]
#> [1] "Brier=0.240"
#> 
#> 
#> attr(,"class")
#> [1] "morie_causal_estimate" "list"