nnpiv.semiparametrics.DML_npiv
- class nnpiv.semiparametrics.DML_npiv(Y, D, Z, W, X1=None, V=None, v_values=None, include_V=True, ci_type='pointwise', loc_kernel='gau', bw_loc='silverman', estimator='MR', model1=<nnpiv.rkhs.rkhsiv.ApproxRKHSIVCV object>, nn_1=False, modelq1=<nnpiv.rkhs.rkhsiv.ApproxRKHSIVCV object>, nn_q1=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, fitargsq1=None, opts=None)[source]
Debiased Machine Learning for Nonparametric Instrumental Variables (DML-npiv) class.
- Parameters
Y (array-like) – Outcome variable.
D (array-like) – Treatment variable.
Z (array-like) – Instrumental variable.
W (array-like) – Negative control outcome.
X1 (array-like or None) – Additional covariates.
V (array-like or None) – Localization covariates. Supplying
Vchanges the estimand to a finite-bandwidth kernel-ratio target.v_values (array-like or None) – Evaluation points for localization.
include_V (bool) – Whether to include localization covariates in the model.
ci_type (str) – Type of confidence interval (‘pointwise’, ‘uniform’).
loc_kernel (str) – Kernel for localization. Options include ‘gau’, ‘epa’, ‘uni’, and ‘tri’.
bw_loc (str) – Bandwidth for localization.
estimator (str) – Estimator type (‘MR’, ‘OR’, ‘IPW’).
model1 (estimator) – Model for the first stage.
nn_1 (bool) – Whether to use a neural network for the first stage.
modelq1 (estimator) – Model for the second stage.
nn_q1 (bool) – Whether to use a neural network for the second stage.
alpha (float) – Significance level for confidence intervals.
n_folds (int) – Number of folds for estimation.
n_rep (int) – Number of repetitions for estimation.
random_seed (int) – Seed for the random number generator.
prop_score (estimator) – Model for the propensity score.
CHIM (bool) – Whether to drop observations with extreme propensity scores using CHIM (2009).
verbose (bool) – Whether to print progress information.
fitargs1 (dict or None) – Arguments for fitting the first-stage model.
fitargsq1 (dict or None) – Arguments for fitting the second-stage model.
opts (dict or None) – Additional options.