EconBase
← Back to paper

(Empirical) Bayes Approaches to Parallel Trends

Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.

15,520 characters · 3 sections · 9 citation commands

Rendered from LaTeX for readability, not typeset faithfully. Citation keys are highlighted; maths is left as source; figures, tables and equation environments are summarised rather than reproduced; unrecognised commands are greyed out so nothing is silently dropped. Email addresses are removed.

(Empirical) Bayes Approaches to Parallel Trends

\shortTitle{(Empirical) Bayes Parallel Trends} \pubMonth{Month} \pubYear{Year} \pubVolume{Vol} \pubIssue{Issue}

Researchers employing a difference-in-differences (DiD) design are often unsure about the validity of the parallel trends assumption. It is common to test for “pre-trends”, yet such tests may be underpowered, and relying on them leads to statistical issues from pre-testing roth_pretest_2022. Recent work by manski_how_2017 and rambachan_more_2023 has made progress on obtaining more credible inference when parallel trends may be violated by adopting a partial identification approach. In RR, for example, the researcher places bounds that restrict the possible values of the post-treatment violations of parallel trends $\delta_{post}$ given the identified pre-treatment violations $\delta_{pre}$. The identified set for the treatment effect then corresponds to the worst-case bounds for $\delta_{post}$ given the observed $\delta_{pre}$.

We instead consider a Bayesian approach where the researcher imposes a prior on the violations of parallel trends $\delta$. The researcher then updates their posterior about $\delta_{post}$ given the observed estimate of $\delta_{pre}$. This allows them to form posterior means and credible sets (CSs) for the treatment effect $\tau_{post}$. The Bayesian approach allows the researcher to impose ex ante information about what violations of parallel trends may look like, and thus to potentially obtain more informative results than the partial identification approach using worst-case bounds. It also allows one to form point estimates in addition to confidence sets. For settings with many pre-treatment periods, we also consider empirical Bayes (EB) approaches, where the “prior” for the violations of parallel trends is calibrated using the pre-trends.

For more general work on Bayesian approaches in settings with partial identification, see moon_bayesian_2012, giacomini_robust_2021. For a related EB approach to parallel trends, see leavitt_beyond_2020.

Set-up

Following RR, we consider a setting where the researcher observes a vector of event-study estimates $\ensuremath{\hat{\beta}} = (\ensuremath{\hat{\beta}}_{pre}', \ensuremath{\hat{\beta}}_{post}')' \in \mathbb{R}^{\underaccent{\bar}{T} + \bar{T}}$ corresponding to $\underaccent{\bar}{T}$ pre-treatment and $\bar{T}$ post-treatment periods. Motivated by asymptotics based on the central limit theorem, we suppose that $\ensuremath{\hat{\beta}}$ is normally distributed with known variance, $\ensuremath{\hat{\beta}} \sim \mathcal{N}\left(\beta,\,\Sigma_{\ensuremath{\hat{\beta}}}\right)$, where

equation[equation omitted — 224 chars of source]

The vector $\tau$ corresponds to the treatment effect in each period (assumed to be zero prior to treatment, $\tau_{pre} = 0$), while $\delta$ corresponds to a vector of biases (e.g. violations of parallel trends). RR consider restrictions that impose that $\delta \in \Delta$. This enables partial identification of $\tau$, with bounds corresponding to worst-case assumptions on the element $\delta \in \Delta$. In this paper, we alternatively consider Bayesian inference where the researcher places a prior on $\delta$, as well as Empirical Bayes approaches where the prior on $\delta_{post}$ is calibrated using $\delta_{pre}$.

Fully Bayesian Approach

We impose a prior $\pi_{\tau, \delta}(\cdot)$ over $\tau, \delta$.\footnote{For notational convenience, in this section we write $\tau$ for a vector of the form $(0,\tau_{post}')'$.} From Bayes' rule, we have that $$p( \tau, \delta \mid \ensuremath{\hat{\beta}} ) \, \propto \, \ell(\ensuremath{\hat{\beta}} \mid \delta + \tau) \cdot \pi_{\tau, \delta}(\tau, \delta),$$ where $\ell( \ensuremath{\hat{\beta}} \mid \beta)$ denotes the normal likelihood of observing $\ensuremath{\hat{\beta}}$ given $\ensuremath{\hat{\beta}} \mid \beta \sim \mathcal{N}\left(\beta,\,\Sigma_{\hat{\beta}}\right)$. Consequently,

align*[align* omitted — 234 chars of source]

Thus, given a prior $\pi_{\tau,\delta}$ it is straightforward to compute the posterior $p(\tau \mid \ensuremath{\hat{\beta}})$.

In what follows, we will primarily consider the case where the researcher has an uninformative prior on $\tau \mid \delta$, so that $\pi_{\tau \mid \delta}(\tau \mid \delta) \,\propto\, 1 $, in which case $$p(\tau \mid \ensuremath{\hat{\beta}}) \, \propto \, \int \ell(\ensuremath{\hat{\beta}} \mid \delta + \tau) \cdot \pi_\delta(\delta) \, d\delta.$$

The following result characterizes the posterior mean for $\tau_{post}$ when the prior is uninformative.

propIf the prior for $\tau$ is uninformative (i.e. $\pi_{\tau \mid \delta} \,\propto \, 1$), then \begin{align*} &E[\tau_{post} \mid \ensuremath{\hat{\beta}}] = \\ &E[ \beta_{post} \mid \ensuremath{\hat{\beta}} ] - \underbrace{ E[ E[\delta_{post} \mid \delta_{pre} = \beta_{pre}] \mid \ensuremath{\hat{\beta}} ] }_{= E[\delta_{post} \mid \ensuremath{\hat{\beta}}]} \end{align*}

Proposition (ref) shows that the posterior mean for $\tau_{post}$ is simply the difference between the posterior for $\beta_{post}$ and the posterior for $\delta_{post}$. It shows further that the posterior for $\delta_{post}$ can be written as an iterated expectation, where the inner expectation is based on the conditional prior of $\delta_{post}$ given $\delta_{pre}$, and the outer expectation is over the posterior for $\beta_{pre} \mid \ensuremath{\hat{\beta}}$.

It is worth noting that the expression for $E[\tau_{post} \mid \ensuremath{\hat{\beta}}]$ derived in Proposition (ref) depends on the conditional prior on the post-treatment bias $\delta_{post}$ given the pre-trend $\delta_{pre}$, regardless of the precision of the estimates $\ensuremath{\hat{\beta}}$. This reflects the well-known fact that in partially identified settings, the prior matters even asymptotically. Researchers adopting this approach must therefore be careful to choose a prior that reflects economic information about the possible violations of parallel trends.

\paragraph{Example: Gaussian Prior} Suppose we have a Gaussian prior for $\delta$, $\delta \sim \mathcal{N}\left(\mu_\delta,\,V_\delta\right)$ and impose the uninformative prior for $\tau$. A straightforward calculation using Bayes' rule shows that the posterior for $\tau_{post}$ is also Gaussian. To derive the posterior mean, note that the formula for the conditional mean of a Gaussian vector implies that $$E[ \delta_{post} \mid \delta_{pre} ] = \mu_{\delta_{post}} + \Gamma_V' (\delta_{pre} - \mu_{\delta_{pre}}) ,$$

for $\Gamma_V = V_{\delta_{pre}}^{-1} V_{\delta_{pre},\delta_{post}}$. Applying Proposition (ref), $$E[ \tau_{post} \mid \ensuremath{\hat{\beta}} ] = \beta^*_{post} - \mu_{\delta_{post}} - \Gamma_V' (\beta_{pre}^* - \mu_{\delta_{pre}}) ,$$ where $\beta^* = E[\beta \mid \ensuremath{\hat{\beta}}]$ is the posterior mean for $\beta$.

One can further show that the posterior mean for $\beta_{pre}$ is

align*[align* omitted — 210 chars of source]

which “shrinks” the point-estimate $\ensuremath{\hat{\beta}}_{pre}$ towards the prior mean $\mu_{\delta_{pre}}$. Likewise, the posterior mean for $\beta_{post}$ is

align*[align* omitted — 129 chars of source]

for $\Gamma_\Sigma = \Sigma_{\ensuremath{\hat{\beta}}_{pre}}^{-1} \Sigma_{\ensuremath{\hat{\beta}}_{pre},\ensuremath{\hat{\beta}}_{post}}$. See the Online Appendix for detailed calculations, a formula for the posterior variance of $\tau_{post}$, and an extension to the case with an uninformative Gaussian prior on $\tau_{post}$.

\paragraph{Empirical Illustration}

benzarti_who_2019 study the impacts of a reduction in the value-added tax on restaurants in France. They run a non-staggered DiD design comparing profits for restaurants to those of firms in other industries not affected by the tax change. The key concern with this approach is that there might be idiosyncratic economic factors affecting the profits of restaurants that do not affect other industries, which would lead to violations of parallel trends. We calibrate our prior on these violations using mcgahan_persistence_1999, who estimate an $AR(1)$ process for the industry-level component of firm profits (see the Online Appendix for detail). We take their estimates of the $AR(1)$ parameters and assume that the $AR(1)$ innovations are from a mean-zero Gaussian, which implies a Gaussian prior for the violations of parallel trends. The figure below shows the original OLS estimates and confidence intervals (CIs) from BZ, as well as posterior means and 95% CSs from our Bayesian approach.

center[center omitted — 86 chars of source]

The posterior CSs are wider than the OLS CIs, since the OLS CIs assume that parallel trends holds exactly, whereas our prior puts positive weight on violations of parallel trends. Nevertheless, the CSs are informative, excluding zero in 3 out of 4 post-treatment periods. The posterior means are also somewhat closer to zero than the OLS estimates. This is because $\delta_{pre}$ and $\delta_{post}$ are correlated under the imposed prior; thus, the primarily positive estimates for $\ensuremath{\hat{\beta}}_{pre}$ lead to a posterior that the post-treatment bias $\delta_{post}$ is positive.

Empirical Bayes Approaches

We saw in the previous section that the conditional prior $\delta_{post} \mid \delta_{pre}$ matters regardless of the precision of the event-study estimates $\ensuremath{\hat{\beta}}$. This conditional prior governs how violations of parallel trends evolve over time. In settings where we have many pre-treatment periods, and we think that the violations of parallel trends come from a stationary process, it might be attractive to learn the time-series dependence of violations of parallel trends from the pre-trends. This motivates an EB approach where the parameters of the time series process for violations of parallel trends are learned from the pre-trends, and posterior estimates are then calculated based on the prior implied by the estimated parameters.

As a simple illustration, suppose that violations of parallel trends across consecutive periods are governed by $w_t := \delta_t - \delta_{t-1} \overset{iid}{\sim} \mathcal{N}\left(\mu,\,\sigma^2\right)$. In a simple non-staggered DiD, this corresponds to the case where the idiosyncratic factors differentially affecting the treated group follow a Gaussian random walk with drift. Let $w_{pre} = (w_{-\underaccent{\bar}{T}+1},...,w_{0})'$ collect the pre-treatment values of $w_t$. Analogously define the vector $\hat{w}_{pre}$ to collect the estimate of $w_{pre}$ using $\ensuremath{\hat{\beta}}_{pre}$ instead of $\delta_{pre}$. Then we have that $\hat{w}_{pre} \sim \mathcal{N}\left( \mu \cdot \mathbf{1} ,\, \Sigma_w + \sigma^2 I \right)$, where $\mathbf{1}$ is the vector of ones, and $\Sigma_w = M \Sigma_{\ensuremath{\hat{\beta}}_{pre}} M'$ for $M$ the matrix such that $\hat{w}_{pre} = M \ensuremath{\hat{\beta}}_{pre}$. The parameters $\mu$ and $\sigma^2$ can thus be estimated via maximum likelihood, which will be consistent (under mild regularity conditions on $\Sigma_w$) as the number of pre-treatment periods grows large, $\underaccent{\bar}{T} \to \infty$. Since the assumption that $w_t \overset{iid}{\sim} \mathcal{N}\left(\mu,\,\sigma^2\right)$ implies a normal prior for $\delta$,\footnote{We adopt the common normalization that $\delta_0 =0$, which allows us to infer the distribution of $\delta$ from $w$.} it is straightforward to calculate the posterior for $\tau_{post}$ using the prior implied by the estimates $\hat\mu, \hat\sigma$.

One caveat to this approach is that the consistency of the estimates for the prior depends on the number of pre-treatment periods $\underaccent{\bar}{T}$ being large. In practice, the number of pre-treatment periods may be moderate---e.g., in our empirical application below, it is 9---in which case estimates based on this approach must be interpreted with some caution. We note that an alternative to the EB approach when the number of periods is moderate is to consider a hierarchical Bayes model, where one imposes a hyper-prior on the parameters $\mu,\sigma^2$ and then updates their prior based on the observed estimate of $\ensuremath{\hat{\beta}}_{pre}$. This approach retains validity even when $\hat\mu,\hat\sigma$ are only imprecisely estimated, but of course requires the researcher to specify a prior on the hyper-parameters.

\paragraph{Empirical Illustration}

lovenheim_long-run_2019 study how being exposed to laws that increase the power of teachers' unions as a student impacts earnings in adulthood. They use a two-way fixed effects event-study specification exploiting the differential timing of the passage of these laws.\footnote{A recent literature surveyed in roth_whats_2023 has shown that such specifications may be difficult to interpret under treatment effect heterogeneity; one could re-do the analysis here with the event-study from one of the estimators developed for this case.} The concern with the parallel trends assumption is that states passing these laws may have different secular trends in labor market outcomes. To address this, we suppose that $w_t \overset{iid}{\sim} \mathcal{N}\left(\mu,\,\sigma^2\right)$, and estimate the parameters $\mu,\sigma$ using maximum likelihood based on the pre-trends.

Using female employment (in p.p.) as the outcome, we estimate $\hat\mu = -0.24, \hat\sigma = 0.61$, indicating a downward-sloping pre-trend and some variance around it. Because of the prior that the violation of parallel trends is downward sloping, the posterior means for the treatment effects are substantially closer to zero than the OLS estimates (see figure above). The CSs are also substantially wider than the OLS CIs, especially in later post-treatment periods, owing to uncertainty about the violations of parallel trends.