From 3968b599ea91b45117583484ad8f2e8aaa8be922 Mon Sep 17 00:00:00 2001 From: igerber Date: Sun, 22 Feb 2026 16:18:39 -0500 Subject: [PATCH] Fix dollar sign escaping in continuous DiD tutorial The previous single-backslash escape (\$) was not preventing MathJax from interpreting paired dollar signs on the same line as inline LaTeX delimiters. Double-escape (\\$) so markdown consumes one backslash level and MathJax sees \$ as a literal dollar sign. Co-Authored-By: Claude Opus 4.6 --- docs/tutorials/14_continuous_did.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorials/14_continuous_did.ipynb b/docs/tutorials/14_continuous_did.ipynb index 303e5c0..d3840c6 100644 --- a/docs/tutorials/14_continuous_did.ipynb +++ b/docs/tutorials/14_continuous_did.ipynb @@ -105,7 +105,7 @@ "source": [ "## 2. Data Setup\n", "\n", - "We generate a balanced panel of workers. Some are assigned to a training cohort (treated in period 2), while 30% are never treated. Each trained worker receives a dose (hours) drawn from a log-normal distribution. The true treatment effect is **ATT(d) = 1 + 2d** — each hour of training adds \\$2 to earnings, plus a base effect of \\$1 for any training at all." + "We generate a balanced panel of workers. Some are assigned to a training cohort (treated in period 2), while 30% are never treated. Each trained worker receives a dose (hours) drawn from a log-normal distribution. The true treatment effect is **ATT(d) = 1 + 2d** — each hour of training adds \\\\$2 to earnings, plus a base effect of \\\\$1 for any training at all." ] }, { @@ -301,8 +301,8 @@ "source": [ "### Interpreting the dose-response curves\n", "\n", - "- **Left panel (ATT):** The total effect of training rises roughly linearly with dose, closely tracking the true curve (dashed). A worker with 3 hours of training gains about \\$7 in earnings; a worker with 5 hours gains about \\$11.\n", - "- **Right panel (ACRT):** The marginal return to one additional hour is approximately constant at \\$2, matching the true DGP. The confidence band is wider at extreme doses where fewer workers are observed.\n", + "- **Left panel (ATT):** The total effect of training rises roughly linearly with dose, closely tracking the true curve (dashed). A worker with 3 hours of training gains about \\\\$7 in earnings; a worker with 5 hours gains about \\\\$11.\n", + "- **Right panel (ACRT):** The marginal return to one additional hour is approximately constant at \\\\$2, matching the true DGP. The confidence band is wider at extreme doses where fewer workers are observed.\n", "\n", "These curves require the **strong parallel trends** assumption. Under standard PT only, the overall binarized effect is identified — this is ATT_loc (the local average across dose groups). The dose-response curve and ACRT_glob are not identified under standard PT because they involve cross-dose comparisons and counterfactual dose-response derivatives. The ATT_glob reported by the estimator is mechanically the binarized DiD: under standard PT it equals ATT_loc, while under strong PT it additionally equals the global average ATT_glob." ]