Dynamic Treatment Effect
The package supports Debiased Machine Learning (DML) for two-period dynamic treatment effects. The observed data are \(W=(X_1,D_1,X_2,D_2,Y)\), where \(X_1\) are baseline covariates, \(D_1 \in \{0,1\}\) is the first-period treatment, \(X_2\) are intermediate covariates, \(D_2 \in \{0,1\}\) is the second-period treatment, and \(Y\) is the final outcome.
Dynamic treatment mean
For a treatment path \(d=(d_1,d_2)\), the target estimand is \(\mathbb{E}[Y(d_1,d_2)]\).
Let \(S_1=(1,X_1^\top)^\top\) and \(S_2=(1,X_1^\top,X_2^\top)^\top\). First define the path-specific sequential propensities
Following the package’s nuisance notation, define
The implemented multiply robust score is
This is the same bilinear influence-function structure used in the nested NPIV paper. In the paper’s generic notation,
the dynamic-treatment specialization is
Thus the dynamic score follows the same convention as the long-term and mediated scores: \(\nu_d\) is the outer outcome/state regression, \(\delta_d\) is the inner outcome regression, and \(\alpha_d,\eta_d\) are the balancing weights multiplying the two residuals.
The first-period nuisance \(\nu_d(W)\) can be fitted by regressing \(\hat{\delta}_d(W)\) on \(S_1\) among observations with \(D_1=d_1\), or with the sequential doubly robust learner (S-DRL) pseudo-outcome
Localization works as in the other semiparametric DML classes.
Since dynamic effects localize on period-1 variables, V is appended to X1 when include_V=True and is also used to form local kernel weights.
For the uncentered path-specific score \(\psi_d\), the finite-bandwidth target is
Writing \(\ell_{\lambda,v}=K/\mathbb{E}[K]\), its centered score contribution is \(\ell_{\lambda,v}\{\psi_d-\theta_{d,\lambda}(v)\}\).
When CHIM=True, the overlap indicator multiplies both the score and its loading, so estimation remains a ratio moment for the overlap-restricted localized target.
Inference treats the estimated trimming rule as fixed.
OR and IPW use the same centering; see Localized Ratio Targets for its inferential interpretation.
The outcome stage is always nested/sequential. By default, DML_dynamic uses an RKHS IV learner for both \(\delta_d\) and \(\nu_d\), matching the default style of the other DML classes. Outcome learners should follow the package NPIV-style interface fit(Z, T, Y) and predict(T); linear notebook examples use nnpiv.tsls.tsls for this reason. To use distinct learners for the two nested regressions, pass them as model1=[delta_model, nu_model]. Neural network learners can be used by setting nn_1=True for both stages or nn_1=[delta_is_nn, nu_is_nn] for stage-specific control. The propensity score model defaults to LogisticRegression(); overlap trimming is handled through CHIM=True.
|
Debiased Machine Learning for two-period dynamic treatment effects. |
References
Bradic, J., Ji, W., Zhang, Y., 2024. High-dimensional inference for dynamic treatment effects. The Annals of Statistics, 52(2), 415-440.
Bodory, H., Huber, M., Laffers, L., 2022. Evaluating (weighted) dynamic treatment effects by double machine learning. The Econometrics Journal, Volume 25, Issue 3.