Skip to content

Commit af855c5

Browse files
authored
Merge pull request #245 from esmucler/add_reference
Add reference to preprint describing robust confidence set
2 parents c4a0ed7 + b8c56d4 commit af855c5

File tree

1 file changed

+11
-23
lines changed

1 file changed

+11
-23
lines changed

doc/examples/py_double_ml_robust_iv.ipynb

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
{
1212
"cell_type": "markdown",
13+
"id": "6c070d4e",
1314
"metadata": {},
1415
"source": [
1516
"In this example we will show how to use the DoubleML package to obtain confidence sets for the treatment effects that are robust to weak instruments. Weak instruments are those that have a relatively weak correlation with the treatment. It is well known that in this case, standard methods to construct confidence intervals have poor properties and can have coverage much lower than the nominal value. We will assume that the reader of this notebook is already familiar with DoubleML and how it can be used to fit instrumental variable models.\n",
@@ -29,7 +30,8 @@
2930
},
3031
{
3132
"cell_type": "code",
32-
"execution_count": 1,
33+
"execution_count": null,
34+
"id": "f9e7a46f",
3335
"metadata": {},
3436
"outputs": [],
3537
"source": [
@@ -46,6 +48,7 @@
4648
},
4749
{
4850
"cell_type": "markdown",
51+
"id": "b6b976ce",
4952
"metadata": {},
5053
"source": [
5154
"# Running a small simulation"
@@ -61,7 +64,7 @@
6164
},
6265
{
6366
"cell_type": "code",
64-
"execution_count": 2,
67+
"execution_count": null,
6568
"id": "82111204",
6669
"metadata": {},
6770
"outputs": [],
@@ -86,7 +89,7 @@
8689
},
8790
{
8891
"cell_type": "code",
89-
"execution_count": 3,
92+
"execution_count": null,
9093
"id": "9a347c25",
9194
"metadata": {},
9295
"outputs": [],
@@ -117,7 +120,7 @@
117120
},
118121
{
119122
"cell_type": "code",
120-
"execution_count": 4,
123+
"execution_count": null,
121124
"id": "600b8196",
122125
"metadata": {},
123126
"outputs": [],
@@ -163,26 +166,10 @@
163166
},
164167
{
165168
"cell_type": "code",
166-
"execution_count": 5,
169+
"execution_count": null,
167170
"id": "86c83edc",
168171
"metadata": {},
169-
"outputs": [
170-
{
171-
"name": "stdout",
172-
"output_type": "stream",
173-
"text": [
174-
" DML coverage Robust coverage DML median length \\\n",
175-
"instrument_strength \n",
176-
"0.003 0.15 0.91 0.489567 \n",
177-
"1.000 0.93 0.92 0.572717 \n",
178-
"\n",
179-
" Robust median length \n",
180-
"instrument_strength \n",
181-
"0.003 inf \n",
182-
"1.000 0.582754 \n"
183-
]
184-
}
185-
],
172+
"outputs": [],
186173
"source": [
187174
"results_df = pd.DataFrame(output_list)\n",
188175
"summary_df = results_df.groupby(\"instrument_strength\").agg(\n",
@@ -211,6 +198,7 @@
211198
"- Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., and Hansen, C. (2018). Double/debiased machine learning for\n",
212199
"treatment and structural parameters. The Econometrics Journal, 21(1):C1–C68.\n",
213200
"- Ma, Y. (2023). Identification-robust inference for the late with high-dimensional covariates. arXiv preprint arXiv:2302.09756.\n",
201+
"- Smucler, E., Lanni, L., Masip, D. (2025). A note on the properties of the confidence set for the local average treatment effect obtained by inverting the score test. arXiv preprint 2506.10449\n",
214202
"- Stock, J. H. and Wright, J. H. (2000). GMM with weak identification. Econometrica, 68(5):1055–1096.\n",
215203
"- Takatsu, K., Levis, A. W., Kennedy, E., Kelz, R., and Keele, L. (2023). Doubly robust machine learning for an instrumental\n",
216204
"variable study of surgical care for cholecystitis. arXiv preprint arXiv:2307.06269."
@@ -233,7 +221,7 @@
233221
"name": "python",
234222
"nbconvert_exporter": "python",
235223
"pygments_lexer": "ipython3",
236-
"version": "3.12.3"
224+
"version": "3.13.1"
237225
}
238226
},
239227
"nbformat": 4,

0 commit comments

Comments
 (0)