Fits the propensity score g(X) = P(A = 1 | X) and the outcome regression
Q_a(X) = E[Y | A = a, X] with a shared Super Learner library, under one of
three fitting schemes. Every scheme returns the same object shape, so the
downstream estimators (dr_aipw(), dr_tmle(), ...) are identical regardless
of how the nuisances were fit.
Arguments
- Y
Numeric outcome vector.
- A
Binary treatment vector (0/1).
- X
Covariates (data frame or matrix).
- strategy
Nuisance-fitting scheme:
"full"(in-sample, classic AIPW/TMLE),"crossfit"(out-of-fold, DML / CV-TMLE), or"double"(double cross-fit, DC-AIPW / DC-TMLE).- V
Number of folds for
"crossfit".- Vd
Number of folds for
"double".- SL.library
Super Learner library shared by
gandQ(default default_dr_library).- family_y
Outcome family:
stats::gaussian()(continuous) orstats::binomial()(binary).- gbound
Truncation bounds for the estimated propensity.
- seed
RNG seed for fold construction.
Value
A list with pi (bounded propensity), Q1, Q0, QA, and, for the
cross-fit schemes, the fold assignment.