Skip to content

Commit 32aa904

Browse files
committed
add qte scores
1 parent c16a2b8 commit 32aa904

File tree

2 files changed

+90
-10
lines changed

2 files changed

+90
-10
lines changed

doc/guide/heterogeneity.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _heterogeneity:
22

3-
Heterogeneous Treatment Effects
3+
Heterogeneous treatment effects
44
----------------------------------------
55

66
All implemented solutions focus on the :ref:`IRM <irm-model>` or :ref:`IIVM <iivm-model>` models, as for
@@ -10,7 +10,7 @@ via feature construction.
1010

1111
.. _gates:
1212

13-
Group Average Treatment Effects (GATEs)
13+
Group average treatment effects (GATEs)
1414
++++++++++++++++++++++++++++++++++++++++++++++
1515

1616
.. include:: ../shared/heterogeneity/gate.rst
@@ -53,7 +53,7 @@ A more detailed notebook on GATEs is available in the :ref:`example gallery <exa
5353

5454
.. _cates:
5555

56-
Conditional Average Treatment Effects (CATEs)
56+
Conditional average treatment effects (CATEs)
5757
++++++++++++++++++++++++++++++++++++++++++++++
5858

5959
.. include:: ../shared/heterogeneity/cate.rst
@@ -105,7 +105,7 @@ Quantiles
105105
The :ref:`DoubleML <doubleml_package>` package includes (local) quantile estimation for potential outcomes for
106106
:ref:`IRM <irm-model>` and :ref:`IIVM <iivm-model>` models.
107107

108-
Potential Quantiles (PQs)
108+
Potential quantiles (PQs)
109109
*******************************************
110110

111111
.. include:: ../shared/heterogeneity/pq.rst
@@ -148,7 +148,7 @@ Estimation is conducted via its ``fit()`` method:
148148
dml_lpq_obj.fit().summary
149149
150150
151-
Quantile Treatment Effects (QTEs)
151+
Quantile treatment effects (QTEs)
152152
*******************************************
153153

154154
.. include:: ../shared/heterogeneity/qte.rst
@@ -171,16 +171,16 @@ Quantile Treatment Effects (QTEs)
171171
dml_qte_obj = dml.DoubleMLQTE(obj_dml_data, ml_g, ml_m, score='PQ', quantiles=[0.25, 0.5, 0.75])
172172
dml_qte_obj.fit().summary
173173
174-
To estimate local quantile effects the ``score`` argument has to be set to ``LPQ``.
174+
To estimate local quantile effects the ``score`` argument has to be set to ``'LPQ'``.
175175
A detailed notebook on PQs and QTEs is available in the :ref:`example gallery <examplegallery>`.
176176

177-
Conditional Value at Risk (CVaR)
177+
Conditional value at risk (CVaR)
178178
++++++++++++++++++++++++++++++++++++++++++++
179179

180180
The :ref:`DoubleML <doubleml_package>` package includes conditional value at risk estimation for
181181
:ref:`IRM <irm-model>` models.
182182

183-
CVaR of Potential Outcomes
183+
CVaR of potential outcomes
184184
*******************************************
185185

186186
.. include:: ../shared/heterogeneity/cvar.rst
@@ -205,12 +205,12 @@ Estimation is conducted via its ``fit()`` method:
205205
dml_cvar_obj.fit().summary
206206
207207
208-
CVaR Treatment Effect
208+
CVaR treatment effects
209209
*******************************************
210210

211211
.. include:: ../shared/heterogeneity/cvar_qte.rst
212212

213-
``DoubleMLQTE`` implements CVaR treatment effect estimation, if the ``score`` argument has been set to ``CVaR`` (default is ``PQ``).
213+
``DoubleMLQTE`` implements CVaR treatment effect estimation, if the ``score`` argument has been set to ``'CVaR'`` (default is ``'PQ'``).
214214
Estimation is conducted via its ``fit()`` method:
215215

216216
.. tabbed:: Python

doc/guide/scores.rst

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,86 @@ with :math:`\eta=(g, m, r)` and where the components of the linear score are
282282
283283
\psi_b(W; \eta) &= g(1,X) - g(0,X) + \frac{Z (Y - g(1,X))}{m(X)} - \frac{(1 - Z)(Y - g(0,X))}{1 - m(x)}.
284284
285+
286+
Potential quantiles (PQs)
287+
**********************************
288+
289+
For ``DoubleMLPQ`` the only valid option is ``score='PQ'``. For ``treatment=d`` with :math:`d\in\{0,1\}` and
290+
a quantile :math:`\tau\in (0,1)` this implements the nonlinear score function:
291+
292+
.. math::
293+
294+
\psi(W; \theta, \eta) := g_{d}(X, \tilde{\theta}) + \frac{1\{D=d\}}{m(X)}(1\{Y\le \theta\} - g_d(X, \tilde{\theta})) - \tau
295+
296+
297+
where :math:`\eta=(g_d,m)` with true values
298+
299+
.. math::
300+
301+
g_{d,0}(X, \theta_0) &= \mathbb{E}[1\{Y\le \theta_0\}|X, D=d]
302+
303+
m_0(X) &= P(D=d|X).
304+
305+
Remark that :math:`g_{d,0}(X,\theta_0)` depends on the target parameter :math:`\theta_0`, such that
306+
the score is estimated with a preliminary estimate :math:`\tilde{\theta}`. For further details, see Kallus et al., (2019).
307+
308+
309+
Local potential quantiles (LPQs)
310+
**********************************
311+
312+
For ``DoubleMLLPQ`` the only valid option is ``score='LPQ'``. For ``treatment=d`` with :math:`d\in\{0,1\}`, instrument :math:`Z` and
313+
a quantile :math:`\tau\in (0,1)` this implements the nonlinear score function:
314+
315+
.. math::
316+
317+
\psi(W; \theta, \eta) :=& \Big(g_{d, Z=1}(X, \tilde{\theta}) - g_{d, Z=0}(X, \tilde{\theta}) + \frac{Z}{m(X)}(1\{D=d\} \cdot 1\{Y\le \theta\} - g_{d, Z=1}(X, \tilde{\theta}))
318+
319+
&\quad - \frac{1-Z}{1-m(X)}(1\{D=d\} \cdot 1\{Y\le \theta\} - g_{d, Z=0}(X, \tilde{\theta}))\Big) \cdot \frac{2d -1}{\gamma} - \tau
320+
321+
322+
where :math:`\eta=(g_{d,Z=1}, g_{d,Z=0}, m, \gamma)` with true values
323+
324+
.. math::
325+
326+
g_{d,Z=z,0}(X, \theta_0) &= \mathbb{E}[1\{D=d\} \cdot 1\{Y\le \theta_0\}|X, Z=z],\quad z\in\{0,1\}
327+
328+
m_{Z=z,0}(X) &= P(D=d|X, Z=z),\quad z\in\{0,1\}
329+
330+
m_0(X) &= P(Z=1|X)
331+
332+
\gamma_0 &= \mathbb{E}[P(D=d|X, Z=1) - P(D=d|X, Z=0)].
333+
334+
Further, the compliance probability :math:`\gamma_0` is estimated with the two additional nuisance components
335+
336+
.. math::
337+
338+
m_{Z=z,0}(X) = P(D=d|X, Z=z),\quad z\in\{0,1\}.
339+
340+
Remark that :math:`g_{d,Z=z,0}(X, \theta_0)` depends on the target parameter :math:`\theta_0`, such that
341+
the score is estimated with a preliminary estimate :math:`\tilde{\theta}`. For further details, see Kallus et al., (2019).
342+
343+
344+
Conditional value at risk (CVaR)
345+
**********************************
346+
347+
For ``DoubleMLCVAR`` the only valid option is ``score='CVAR'``. For ``treatment=d`` with :math:`d\in\{0,1\}` and
348+
a quantile :math:`\tau\in (0,1)` this implements the score function:
349+
350+
.. math::
351+
352+
\psi(W; \theta, \eta) := g_{d}(X, \gamma) + \frac{1\{D=d\}}{m(X)}(\max(\gamma, (1 - \tau)^{-1}(Y - \tau \gamma)) - g_d(X, \gamma)) - \theta
353+
354+
where :math:`\eta=(g_d,m,\gamma)` with true values
355+
356+
.. math::
357+
358+
g_{d,0}(X, \gamma_0) &= \mathbb{E}[\max(\gamma_0, (1 - \tau)^{-1}(Y - \tau \gamma_0))|X, D=d]
359+
360+
m_0(X) &= P(D=d|X)
361+
362+
and :math:`\gamma_0` being the potential quantile of :math:`Y(d)`. As for potential quantiles, the estimate :math:`g_d` is constructed via
363+
a preliminary estimate of :math:`\gamma_0`. For further details, see Kallus et al., (2019).
364+
285365
Specifying alternative score functions via callables
286366
++++++++++++++++++++++++++++++++++++++++++++++++++++
287367

0 commit comments

Comments
 (0)