dml_longterm.DML_longterm
- class dml_longterm.DML_longterm(Y, D, S, G, X1=None, V=None, v_values=None, loc_kernel='gau', bw_loc='silverman', estimator='MR', longterm_model='surrogacy', model1=<nnpiv.rkhs.rkhsiv.ApproxRKHSIVCV object>, nn_1=False, model2=<nnpiv.rkhs.rkhsiv.ApproxRKHSIVCV object>, nn_2=False, alpha=0.05, n_folds=5, n_rep=1, random_seed=123, prop_score=sklearn.linear_model.LogisticRegression, CHIM=False, verbose=True, fitargs1=None, fitargs2=None, opts=None)[source]
Debiased Machine Learning for long-term causal analysis (DML-longterm) class.
The estimand can be either for a model with a surrogacy assumption (Athey, S., Chetty, R., Imbens, G., Kang, H., 2020b. Estimating treatment effects using multiple surrogates: the role of the surrogate score and the surrogate index. arXiv preprint arXiv:1603.09326) or with a latent unconfounded model (Athey, S.; Chetty, R.; Imbens, G., Combining experimental and observational data to estimate treatment effects on long-term outcomes. arXiv preprint arXiv:2006.09676 (2020)). The semiparametric efficiency is derived in Jiafeng Chen, David M. Ritzwoller, Semiparametric estimation of long-term treatment effects, Journal of Econometrics, Volume 237, Issue 2, Part A, 2023.
- Parameters
Y (array-like) – Long-term outcome variable.
D (array-like) – Treatment variable.
S (array-like) – Surrogate outcome variable.
G (array-like) – Group indicator (0 for experimental, 1 for observational).
X1 (array-like, optional) – Additional covariates.
V (array-like, optional) – Localization covariates.
v_values (array-like, optional) – Values for localization.
loc_kernel (str, optional) – Kernel for localization. Options are [‘gau’, ‘epa’, ‘uni’].
bw_loc (str, optional) – Bandwidth for localization.
estimator (str, optional) – Estimator type (‘MR’, ‘OR’, ‘hybrid’, ‘IPW’).
longterm_model (str, optional) – Long-term model type (‘latent_unconfounded’, ‘surrogacy’).
model1 (estimator, optional) – Model for the first stage.
nn_1 (bool, optional) – Use neural network for the first stage.
model2 (estimator, optional) – Model for the second stage.
nn_2 (bool, optional) – Use neural network for the second stage.
alpha (float, optional) – Significance level for confidence intervals.
n_folds (int, optional) – Number of folds for estimation.
n_rep (int, optional) – Number of repetitions for estimation.
random_seed (int, optional) – Seed for random number generator.
prop_score (estimator, optional) – Model for propensity score.
CHIM (bool, optional) – Use CHIM method.
verbose (bool, optional) – Print progress information.
fitargs1 (dict, optional) – Arguments for fitting the first stage model.
fitargs2 (dict, optional) – Arguments for fitting the second stage model.
opts (dict, optional) – Additional options.