Skip to contents

Frisch-Waugh-Lovell partialling-out double machine learning on the OTIS analysis frame, running on the same native cross-fit PLR engine as morie_estimate_double_ml() (Chernozhukov et al. 2018 orthogonal score; median aggregation over repetitions).

Usage

morie_otis_plr(
  df,
  treatment,
  outcome,
  covariates,
  n_folds = 5L,
  n_rep = 1L,
  seed = 123L
)

Arguments

df

Data frame.

treatment, outcome, covariates

Column names.

n_folds

Cross-fit folds. Default 5.

n_rep

Repetition count for median aggregation. Default 1.

seed

RNG seed. Default 123.

Value

An OTIS causal-estimate list (same shape as morie_otis_aipw_ate).

Examples

set.seed(1)
n <- 200
x <- rnorm(n)
d <- rbinom(n, 1, plogis(0.6 * x))
y <- 1.5 * d + x + rnorm(n)
morie_otis_plr(data.frame(y, d, x), treatment = "d",
               outcome = "y", covariates = "x")
#> $estimator
#> [1] "PLR-DML"
#> 
#> $ate
#> [1] 1.407532
#> 
#> $ate_se
#> [1] 0.1531636
#> 
#> $ate_pval
#> [1] 3.93826e-20
#> 
#> $ate_ci95
#> [1] 1.107331 1.707733
#> 
#> $n
#> [1] 200
#> 
#> $n_treated
#> [1] 96
#> 
#> $p_treat
#> [1] 0.48
#> 
#> $notes
#> $notes[[1]]
#> [1] "cross-fit folds=5 reps=1"
#> 
#> 
#> attr(,"class")
#> [1] "morie_causal_estimate" "list"