diff --git a/doc/api/dml_models.rst b/doc/api/dml_models.rst index 11481640..f8adaf06 100644 --- a/doc/api/dml_models.rst +++ b/doc/api/dml_models.rst @@ -17,6 +17,7 @@ doubleml.plm DoubleMLPLR DoubleMLPLIV + DoubleMLLPLR .. _api_irm_models: diff --git a/doc/guide/models/plm/lplr.rst b/doc/guide/models/plm/lplr.rst new file mode 100644 index 00000000..3bb7d146 --- /dev/null +++ b/doc/guide/models/plm/lplr.rst @@ -0,0 +1,13 @@ +**Logistic partially linear regression (LPLR)** models take the form + +.. math:: + + \mathbb{E} [Y | D, X] = \mathbb{P} (Y=1 | D, X) = \text{expit} \{\beta_0 D + r_0 (X) \} + +where :math:`Y` is the binary outcome variable and :math:`D` is the policy variable of interest. +The high-dimensional vector :math:`X = (X_1, \ldots, X_p)` consists of other confounding covariates. +:math:`\text{expit}` is the logistic link function + +.. math:: + \text{expit} ( X ) = \frac{1}{1 + e^{-x}} + diff --git a/doc/guide/models/plm/plm_models.inc b/doc/guide/models/plm/plm_models.inc index 851944fe..ebac3ef5 100644 --- a/doc/guide/models/plm/plm_models.inc +++ b/doc/guide/models/plm/plm_models.inc @@ -120,4 +120,39 @@ Estimation is conducted via its ``fit()`` method: obj_dml_data = DoubleMLData$new(data, y_col="y", d_col = "d", z_cols= "Z1") dml_pliv_obj = DoubleMLPLIV$new(obj_dml_data, ml_l, ml_m, ml_r) dml_pliv_obj$fit() - print(dml_pliv_obj) \ No newline at end of file + print(dml_pliv_obj) + +Logistic partially linear regression model (LPLR) +*************************************** + +.. include:: /guide/models/plm/lplr.rst + +.. include:: /shared/causal_graphs/plr_irm_causal_graph.rst + +``DoubleMLLPLR`` implements LPLR models. Estimation is conducted via its ``fit()`` method. + +.. note:: + Remark that the treatment effects are not additive in this model. The partial linear term enters the model through a logistic link function. + +.. tab-set:: + + .. tab-item:: Python + :sync: py + + .. ipython:: python + + import numpy as np + import doubleml as dml + from doubleml.plm.datasets import make_lplr_LZZ2020 + from sklearn.ensemble import RandomForestRegressor, RandomForestClassifier + from sklearn.base import clone + np.random.seed(3141) + ml_t = RandomForestRegressor(n_estimators=100, max_features=20, max_depth=5, min_samples_leaf=2) + ml_m = RandomForestRegressor(n_estimators=100, max_features=20, max_depth=5, min_samples_leaf=2) + ml_M = RandomForestClassifier(n_estimators=100, max_features=20, max_depth=5, min_samples_leaf=2) + obj_dml_data = make_lplr_LZZ2020(alpha=0.5, n_obs=500, dim_x=20) + dml_lplr_obj = dml.DoubleMLPLR(obj_dml_data, ml_M, ml_t, ml_m) + dml_lplr_obj.fit().summary + + +