Difference-in-Differences with a Continuous Treatment

Brantly Callaway

University of Georgia

March 29, 2025

Introduction

\(\newcommand{\E}{\mathbb{E}} \newcommand{\E}{\mathbb{E}} \newcommand{\var}{\mathrm{var}} \newcommand{\cov}{\mathrm{cov}} \newcommand{\Var}{\mathrm{var}} \newcommand{\Cov}{\mathrm{cov}} \newcommand{\Corr}{\mathrm{corr}} \newcommand{\corr}{\mathrm{corr}} \newcommand{\L}{\mathrm{L}} \renewcommand{\P}{\mathrm{P}} \newcommand{\independent}{{\perp\!\!\!\perp}} \newcommand{\indicator}[1]{ \mathbf{1}\{#1\} }\)The DiD sessions yesterday (largely) focused on the case with a binary, staggered treatment

This session: Move from a setting with a binary treatment case to one with a continuous treatment (“dose”)

Some of the arguments involve extending ideas from the binary, staggered treatment case to a setting with continuous treatment

  • But we will also face new conceptual issues in this case that do not show up in a setting with a binary treatment

Today’s talk mostly follows Callaway, Goodman-Bacon, and Sant’Anna (2024)

Example:

  • Effect of \(\underbrace{\textrm{length of school closures}}_{\textrm{continuous treatment}}\) (during Covid) on \(\underbrace{\textrm{students' test scores}}_{\textrm{outcome}}\)

Clarifications about Continuous Treatment - What’s Included

For today, mostly emphasize a continuous treatment, but our results also apply to other settings (with trivial modifications):

  • multi-valued treatments (e.g., effect of state-level minimum wage policies on employment)

  • binary policy variable with differential “exposure” to it (application in the paper: a binary Medicare policy where different hospitals had more exposure to the policy)

Clarifications about Continuous Treatment - What’s Not Included

We will focus on a setting with a panel data natural experiment

  • No units are treated in the first period, some units become treated, with possibly different doses, in the second period

This narrows our focus for today and rules out:

  • Applications where units are already treated in different amounts in the first period (see: Chaisemartin, d’Haultfœuille, and Vazquez-Bare (2024), Chaisemartin et al. (2025))

  • Applications where interest in understanding the effect of a binary treatment but the researcher observes aggregate data (sometimes called: “fuzzy DiD”), often using policy changes as an instrument

    • Example: Study union wage-premium (at individual level) using state-level data and exploiting variation in the amount of unionization across different locations
    • See de Chaisemartin and D’Haultfœuille (2018) and Miyaji (2025) for more details about this case

Today’s Talk




  1. Identification: What’s the same as in the binary treatment case?

  2. Identification: What’s different from the binary treatment case?

  3. Interpreting TWFE Regressions

  4. Empirical Application

1. Identification: What’s the same as in the binary treatment case?

Continuous Treatment Notation

  • Two time periods: \(t=2\) and \(t=1\)

    • No one treated until period \(t=2\)
    • Some units remain untreated in period \(t=2\)
  • Treatment: \(D_i\)

  • Potential outcomes: \(Y_{it=2}(d)\)

  • Observed outcomes: \(Y_{it=2}\) and \(Y_{it=1}\)

    \[Y_{it=2}=Y_{it=2}(D_i) \quad \textrm{and} \quad Y_{it=1}=Y_{it=1}(0)\]

Parameters of Interest (ATT-type)

Level Effects (Average Treatment Effect on the Treated)

\[ATT(d|d) := \E[Y_{t=2}(d) - Y_{t=2}(0) | D=d]\]

  • Interpretation: The average effect of dose \(d\) relative to not being treated local to the group that actually experienced dose \(d\)

  • This is the natural analogue of \(ATT\) in the binary treatment case

Parameters of Interest (ACR-type)

Slope Effects (Average Causal Response on the Treated)

\[ACRT(d|d) := \frac{\partial ATT(l|d)}{\partial l} \Big|_{l=d}\]

  • Interpretation: \(ACRT(d|d)\) is the causal effect of a marginal increase in dose local to units that actually experienced dose \(d\)

Aggregated Parameters

Notice that \(ATT(d|d)\) and \(ACRT(d|d)\) are functional parameters

  • This is different from \(Y_{it} = \theta_t + \eta_i + \beta^{twfe} D_{it} + e_{it}\)

We can view \(ATT(d|d)\) and \(ACRT(d|d)\) as the “building blocks” for a more aggregated parameter.

Aggregated versions of these (into a single number) are \[\begin{align*} ATT^o := \E\Big[ATT(D|D)\Big|D>0\Big] \qquad \qquad ACRT^o := \E\Big[ACRT(D|D)\Big|D>0\Big] \end{align*}\]

  • \(ATT^o\) averages \(ATT(d|d)\) over the population distribution of the dose

  • \(ACRT^o\) averages \(ACRT(d|d)\) over the population distribution of the dose

    • \(ACRT^o\) is the natural target parameter for the TWFE regression in this case

Identification

“Standard” Parallel Trends Assumption

For all \(d\),

\[\E[\Delta Y(0) | D=d] = \E[\Delta Y(0) | D=0]\]

Identification

“Standard” Parallel Trends Assumption

For all \(d\),

\[\E[\Delta Y(0) | D=d] = \E[\Delta Y(0) | D=0]\]

Then,

\[ \begin{aligned} ATT(d|d) &= \E[Y_{t=2}(d) - Y_{t=2}(0) | D=d] \hspace{150pt} \end{aligned} \]

Identification

“Standard” Parallel Trends Assumption

For all \(d\),

\[\E[\Delta Y(0) | D=d] = \E[\Delta Y(0) | D=0]\]

Then,

\[ \begin{aligned} ATT(d|d) &= \E[Y_{t=2}(d) - Y_{t=2}(0) | D=d] \hspace{150pt}\\ &= \E[Y_{t=2}(d) - Y_{t=1}(0) | D=d] - \E[Y_{t=2}(0) - Y_{t=1}(0) | D=d] \end{aligned} \]

Identification

“Standard” Parallel Trends Assumption

For all \(d\),

\[\E[\Delta Y(0) | D=d] = \E[\Delta Y(0) | D=0]\]

Then,

\[ \begin{aligned} ATT(d|d) &= \E[Y_{t=2}(d) - Y_{t=2}(0) | D=d] \hspace{150pt}\\ &= \E[Y_{t=2}(d) - Y_{t=1}(0) | D=d] - \E[Y_{t=2}(0) - Y_{t=1}(0) | D=d]\\ &= \E[\Delta Y | D=d] - \E[\Delta Y | D=0] \end{aligned} \]

This is exactly what you would expect

Using similar arguments, you can show \[ATT^o = \E[\Delta Y | D>0] - \E[\Delta Y | D=0]\]

2. Identification: What’s different from the binary treatment case?

Are we done?

Unfortunately, no

Most empirical work with a continuous treatment wants to think about how causal responses vary across dose

  • Plot treatment effects as a function of dose and ask: does more dose tends to increase/decrease/not affect outcomes?
  • Average causal response parameters inherently involve comparisons across slightly different doses

There are new issues related to comparing \(ATT(d|d)\) at different doses and interpreting these differences as causal effects

  • Unlike the staggered, binary treatment case: No easy fixes here!

Interpretation Issues

Consider comparing \(ATT(d|d)\) for two different doses

\[ \begin{aligned} & ATT(d_h|d_h) - ATT(d_l|d_l) \hspace{350pt} \end{aligned} \]

Interpretation Issues

Consider comparing \(ATT(d|d)\) for two different doses

\[ \begin{aligned} & ATT(d_h|d_h) - ATT(d_l|d_l) \hspace{350pt}\\ & \hspace{25pt} = \E[Y_{t=2}(d_h)-Y_{t=2}(d_l) | D=d_h] + \E[Y_{t=2}(d_l) - Y_{t=2}(0) | D=d_h] - \E[Y_{t=2}(d_l) - Y_{t=2}(0) | D=d_l] \end{aligned} \]

Interpretation Issues

Consider comparing \(ATT(d|d)\) for two different doses

\[ \begin{aligned} & ATT(d_h|d_h) - ATT(d_l|d_l) \hspace{350pt}\\ & \hspace{25pt} = \E[Y_{t=2}(d_h)-Y_{t=2}(d_l) | D=d_h] + \E[Y_{t=2}(d_l) - Y_{t=2}(0) | D=d_h] - \E[Y_{t=2}(d_l) - Y_{t=2}(0) | D=d_l]\\ & \hspace{25pt} = \underbrace{\E[Y_{t=2}(d_h) - Y_{t=2}(d_l) | D=d_h]}_{\textrm{Causal Response}} + \underbrace{ATT(d_l|d_h) - ATT(d_l|d_l)}_{\textrm{Selection Bias}} \end{aligned} \]

“Standard” Parallel Trends is not strong enough to rule out the selection bias terms here

  • Implication: If you want to interpret differences in treatment effects across different doses, then you will need stronger assumptions than standard parallel trends

  • This problem spills over into identifying \(ACRT(d|d)\)

Interpretation Issues

Intuition:

  • Difference-in-differences identification strategies result in \(ATT(d|d)\) parameters. These are local parameters and difficult to compare to each

  • This explanation is similar to thinking about LATEs with two different instruments

  • Thus, comparing \(ATT(d|d)\) across different values is tricky and not for free

What can you do?

  • One idea, just recover \(ATT(d|d)\) and interpret it cautiously (interpret it by itself not relative to different values of \(d\))

  • If you want to compare them to each other, it will come with the cost of additional (structural) assumptions

Introduce Stronger Assumptions

“Strong” Parallel Trends Assumption

For all doses d and l,

\[\mathbb{E}[Y_{t=2}(d) - Y_{t=1}(0) | D=l] = \mathbb{E}[Y_{t=2}(d) - Y_{t=1}(0) | D=d]\]

  • This is notably different from “Standard” Parallel Trends

  • It involves potential outcomes for all values of the dose (not just untreated potential outcomes)

  • All dose groups would have experienced the same path of outcomes had they been assigned the same dose

Introduce Stronger Assumptions

Strong parallel trends is equivalent to a certain restriction on treatment effect heterogeneity. Notice:

\[ \begin{aligned} ATT(d|d) &= \E[Y_{t=2}(d) - Y_{t=2}(0) | D=d] \hspace{200pt} \ \end{aligned} \]

Introduce Stronger Assumptions

Strong parallel trends is equivalent to a certain restriction on treatment effect heterogeneity. Notice:

\[ \begin{aligned} ATT(d|d) &= \E[Y_{t=2}(d) - Y_{t=2}(0) | D=d] \hspace{200pt} \\\ &= \E[Y_{t=2}(d) - Y_{t=1}(0) | D=d] - \E[Y_{t=2}(0) - Y_{t=1}(0) | D=d] \ \end{aligned} \]

Introduce Stronger Assumptions

Strong parallel trends is equivalent to a certain restriction on treatment effect heterogeneity. Notice:

\[ \begin{aligned} ATT(d|d) &= \E[Y_{t=2}(d) - Y_{t=2}(0) | D=d] \hspace{200pt} \\\ &= \E[Y_{t=2}(d) - Y_{t=1}(0) | D=d] - \E[Y_{t=2}(0) - Y_{t=1}(0) | D=d] \\\ &= \E[Y_{t=2}(d) - Y_{t=1}(0) | D=l] - \E[Y_{t=2}(0) - Y_{t=1}(0) | D=l] \ \end{aligned} \]

Introduce Stronger Assumptions

Strong parallel trends is equivalent to a certain restriction on treatment effect heterogeneity. Notice:

\[ \begin{aligned} ATT(d|d) &= \E[Y_{t=2}(d) - Y_{t=2}(0) | D=d] \hspace{200pt} \\\ &= \E[Y_{t=2}(d) - Y_{t=1}(0) | D=d] - \E[Y_{t=2}(0) - Y_{t=1}(0) | D=d] \\\ &= \E[Y_{t=2}(d) - Y_{t=1}(0) | D=l] - \E[Y_{t=2}(0) - Y_{t=1}(0) | D=l] \\\ &= \E[Y_{t=2}(d) - Y_{t=2}(0) | D=l] = ATT(d|l) \end{aligned} \]

Since this holds for all \(d\) and \(l\), it also implies that \(ATT(d|d) = ATE(d) = \E[Y_{t=2}(d) - Y_{t=2}(0)]\). Thus, under strong parallel trends, we have that

\[ATE(d) = \E[\Delta Y|D=d] - \E[\Delta Y|D=0]\]

RHS is exactly the same expression as for \(ATT(d|d)\) under “standard” parallel trends, but here

  • assumptions are different

  • parameter interpretation is different

Comparisons across dose

ATE-type parameters do not suffer from the same issues as ATT-type parameters when making comparisons across dose

\[ \begin{aligned} ATE(d_h) - ATE(d_l) &= \E[Y_{t=2}(d_h) - Y_{t=2}(0)] - \E[Y_{t=2}(d_l) - Y_{t=2}(0)] \end{aligned} \]

Comparisons across dose

ATE-type parameters do not suffer from the same issues as ATT-type parameters when making comparisons across dose

\[ \begin{aligned} ATE(d_h) - ATE(d_l) &= \E[Y_{t=2}(d_h) - Y_{t=2}(0)] - \E[Y_{t=2}(d_l) - Y_{t=2}(0)]\\ &= \underbrace{\E[Y_{t=2}(d_h) - Y_{t=2}(d_l)]}_{\textrm{Causal Response}} \end{aligned} \]

Thus, recovering \(ATE(d)\) side-steps the issues about comparing treatment effects across doses, but it comes at the cost of needing a (potentially very strong) extra assumption

Given that we can compare \(ATE(d)\)’s across dose, we can recover slope effects in this setting

\[ \begin{aligned} ACR(d) := \frac{\partial ATE(d)}{\partial d} \qquad &\textrm{or} \qquad ACR^o := \E\Big[ACR(D) \Big| D>0\Big] \end{aligned} \]

Additional Comments

Summarizing

It is straightforward/familiar to identify ATT-type parameters with a multi-valued or continuous dose

However, comparison of ATT-type parameters across different doses are hard to interpret

  • They include selection bias terms
  • This issues extends to identifying ACRT parameters
  • These issues extend to TWFE regressions

This suggests targeting ATE-type parameters

  • Comparisons across doses do not contain selection bias terms
  • But identifying ATE-type parameters requires stronger assumptions

3. Interpreting TWFE Regressions

TWFE Regressions in this Context

Consider the same TWFE regression as before: \[\begin{align*} Y_{it} = \theta_t + \eta_i + \beta^{twfe} D_{it} + e_{it} \end{align*}\] We show that \[\begin{align*} \beta^{twfe} = \int_{\mathcal{D}_+} w(l) m'_\Delta(l) \, dl \end{align*}\] where \(m_\Delta(l) := \E[\Delta Y|D=l] - \E[\Delta Y|D=0]\) and \(w(l)\) are weights

  • Under standard parallel trends, \(m'_{\Delta}(l) = ACRT(l|l) + \textrm{local selection bias}\)

  • Under strong parallel trends, \(m'_{\Delta}(l) = ACR(l)\).

About the weights: they are all positive, but have some strange properties (e.g., always maximized at \(l = \E[D]\) (even if this is not a common value for the dose))

  • \(\implies\) even under strong parallel trends, \(\beta^{twfe} \neq ACR^o\).

TWFE Regressions in this Context

Other issues can arise in more complicated cases

  • For example, suppose you have a staggered continuous treatment, then you will additionally get issues that are analogous to the ones we discussed earlier for a binary staggered treatment

  • In general, things get worse for TWFE regressions with more complications

Estimation - What should you do?

Level Effects - no issues related to selection bias

  • For \(ATT^o\): Binarize treatment, \(ATT^o = \E[\Delta Y | D > 0] - \E[\Delta Y | D=0]\).

  • For \(ATT(d|d)\): Nonparametrically estimate \(m_\Delta(d) = \E[\Delta Y|D=d]-\E[\Delta Y|D=0]\)

    • This is not actually too hard to estimate. No curse-of-dimensionality, etc.

Slope Effects - must deal with selection bias

  • Nonparametrically estimate derivative of \(m_\Delta(d)\)

  • For \(ACR(d)\): Under strong parallel trends, derivative is equal to \(ACR(d)\)

  • For \(ACR^o\): Average \(ACR(D)\) over \(D>0\); i.e., \(ACR^o = \E[ACR(D)|D>0]\)

Additional Comments:

  1. Changing the estimation strategy helps with the weights, but it does not fix the issues related to standard vs. strong parallel trends

Estimation - What should you do?

Level Effects - no issues related to selection bias

  • For \(ATT^o\): Binarize treatment, \(ATT^o = \E[\Delta Y | D > 0] - \E[\Delta Y | D=0]\).

  • For \(ATT(d|d)\): Nonparametrically estimate \(m_\Delta(d) = \E[\Delta Y|D=d]-\E[\Delta Y|D=0]\)

    • This is not actually too hard to estimate. No curse-of-dimensionality, etc.

Slope Effects - must deal with selection bias

  • Nonparametrically estimate derivative of \(m_\Delta(d)\)

  • For \(ACR(d)\): Under strong parallel trends, derivative is equal to \(ACR(d)\)

  • For \(ACR^o\): Average \(ACR(D)\) over \(D>0\); i.e., \(ACR^o = \E[ACR(D)|D>0]\)

Additional Comments:

  1. It’s relatively straightforward to extend this strategy to settings with multiple periods and variation in treatment timing by extending existing work about a staggered, binary treatment

4. Empirical Application

Empirical Application

This is a simplified version of Acemoglu and Finkelstein (2008)

1983 Medicare reform that eliminated labor subsidies for hospitals

  • Medicare moved to the Prospective Payment System (PPS) which replaced “full cost reimbursement” with “partial cost reimbursement” which eliminated reimbursements for labor (while maintaining reimbursements for capital expenses)

  • Rough idea: This changes relative factor prices which suggests hospitals may adjust by changing their input mix. Could also have implications for technology adoption, etc.

  • In the paper, we provide some theoretical arguments concerning properties of production functions that suggests that strong parallel trends holds.

Data

Annual hospital-reported data from the American Hospital Association, 1980-1986

Outcome is capital/labor ratio

  • proxy using the depreciation share of total operating expenses (avg. 4.5%)

  • our setup: collapse to two periods by taking average in pre-treatment periods and average in post-treatment periods

Dose is “exposure” to the policy

  • the fraction of Medicare patients in the period before the policy was implemented

  • roughly 15% of hospitals are untreated (have essentially no Medicare patients)

    • AF provide results both using and not using these hospitals as (good) it is useful to have untreated hospitals (bad) they are fairly different (includes federal, long-term, psychiatric, children’s, and rehabilitation hospitals)

Bin Scatter

ATE(T) Plot

\(\widehat{ATT}^o = 0.80~~(\textrm{s.e}.=0.05)\)

ACR(T) Plot

Results

Results

Density weights vs. TWFE weights

TWFE Weights with and without Untreated Group

Conclusion

  • There are a number of challenges to implementing/interpreting DiD with a continuous treatment

  • The extension to multiple periods and variation in treatment timing is relatively straightforward (at least proceeds along the “expected” lines)

  • But (in my view) the main new issue here is that justifying interpreting comparisons across different doses as causal effects requires stronger assumptions than most researchers probably think that they are making

  • Link to paper: https://arxiv.org/abs/2107.02637

Thank you

brantly.callaway@uga.edu

Appendix

References

Ager, Philipp, Katherine Eriksson, Ezra Karger, Peter Nencka, and Melissa A Thomasson. 2024. “School Closures During the 1918 Flu Pandemic.” Review of Economics and Statistics 106 (1): 266–76.
Callaway, Brantly, Andrew Goodman-Bacon, and Pedro HC Sant’Anna. 2024. “Difference-in-Differences with a Continuous Treatment.”
Chaisemartin, Clément de, Xavier d’Haultfoeuille, Félix Pasquier, Doulo Sow, and Gonzalo Vazquez-Bare. 2025. “Difference-in-Differences for Continuous Treatments and Instruments with Stayers.”
Chaisemartin, Clément de, Xavier d’Haultfœuille, and Gonzalo Vazquez-Bare. 2024. “Difference-in-Difference Estimators with Continuous Treatments and No Stayers.” AEA Papers and Proceedings 114: 610–13.
de Chaisemartin, Clement, and Xavier D’Haultfœuille. 2018. “Fuzzy Differences-in-Differences.” The Review of Economic Studies 85 (2): 999–1028.
Gillitzer, Christian, and Nalini Prasad. 2023. “The Effect of School Closures on Standardized Test Scores: Evidence from a Zero-COVID Environment.”
Miyaji, Sho. 2025. “Instrumented Difference-in-Differences with Heterogeneous Treatment Effects.”

Positive Side-Comments: No untreated units

It’s possible to do some versions of DiD with a continuous treatment without having access to a fully untreated group.

  • In this case, it is not possible to recover level effects like \(ATT(d|d)\).

  • However, notice that \[\begin{aligned}& \E[\Delta Y | D=d_h] - \E[\Delta Y | D=d_l] \\ &\hspace{50pt}= \Big(\E[\Delta Y | D=d_h] - \E[\Delta Y(0) | D=d_h]\Big) - \Big(\E[\Delta Y | D=d_l]-\E[\Delta Y(0) | D=d_l]\Big) \\ &\hspace{50pt}= ATT(d_h|d_h) - ATT(d_l|d_l)\end{aligned}\]

  • In words: comparing path of outcomes for those that experienced dose \(d_h\) to path of outcomes among those that experienced dose \(d_l\) (and not relying on having an untreated group) delivers the difference between their \(ATT\)’s.

  • Still face issues related to selection bias / strong parallel trends though

Back

Positive Side-Comments: Alternative approaches

Strategies like binarizing the treatment can still work (though be careful!)

  • If you classify units as being treated or untreated, you can recover the \(ATT^o\) by comparing mean outcome for treated relative to untreated.

  • On the other hand, if you classify units as being “high” treated, “low” treated, or untreated — our arguments imply that selection bias terms can come up when comparing effects for “high” to “low”

Back

Negative Side-Comment: Pre-testing

That the expressions for \(ATE(d)\) and \(ATT(d|d)\) are exactly the same also means that we cannot use pre-treatment periods to try to distinguish between “standard” and “strong” parallel trends. In particular, the relevant information that we have for testing each one is the same

  • In effect, the only testable implication of strong parallel trends in pre-treatment periods is standard parallel trends.

Back

Ex. Mixture of Normals Dose

Back

Ex. Exponential Dose

Back