Skip to contents

Cross-fitting is what makes an arbitrarily complex learner safe: each observation's nuisance value comes from a fit that never saw it, so the empirical-process term vanishes without a Donsker condition. The targeting step is the TMLE one, so the estimator remains a plug-in.

Usage

Tmlmnl(y, D, X, ml_q = NULL, ml_g = NULL)

Arguments

y

Outcome.

D

Binary treatment.

X

Covariates.

ml_q

Function (Xtrain, ytrain, Xtest) returning predictions; NULL uses least squares.

ml_g

Function (Xtrain, Dtrain, Xtest) returning probabilities; NULL uses logistic IRLS.

Value

List with estimate, se, eps, n_folds, n.

Details

Formula: with out-of-fold Q and g, H = D/g - (1 - D)/(1 - g), eps = sum H (y - Q)/sum H^2, psi = mean[Q*(1, X) - Q*(0, X)]. Folds are i mod 5 on the input order, so both language arms use the same partition.

References

Chernozhukov, V. et al. (2018). Econometrics Journal 21(1):C1-C68; van der Laan, M. J. & Rubin, D. (2006). IJB 2(1):11.

Examples

Tmlmnl(y = c(1, 2, 3, 4, 5, 6, 7, 8), D = c(1, 2, 3, 4, 5, 6, 7, 8), X = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] 7.679663e+14
#> 
#> $se
#> [1] 1.775153e+15
#> 
#> $eps
#> [1] -0.00589961
#> 
#> $n_folds
#> [1] 5
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Cross-fitted TMLE with pluggable machine learners"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"