Skip to contents

\(E[Y(1) - Y(0) \mid D = 0]\) from the cross-fitted nuisances of morie_otis_irm_dml (logistic propensity, OLS outcome models per arm): the score \([(1-D)(\mu_1 - \mu_0) + D (1-e)/e (Y - \mu_1) - (1-D)(Y - \mu_0)] / P(D=0)\) averaged, with the iid standard error of its mean.

Usage

morie_otis_atc(
  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.

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_atc(df, "d", "y", "x", n_folds = 3L)$ate
#> [1] 0.4617371