- Introduced by
- Developed from panel event-study literature (Sun & Abraham 2021; Freyaldenhoven et al. 2021) combined with Bayesian estimation frameworks
- Year
- 2010s–2020s
- Type
- Bayesian causal panel estimator
- Family
- Quasi-experimental / causal inference
What does it do?
Bayesian Panel Event Study estimates how an outcome changes before and after a datable treatment, using panel data and a model in which the event-time coefficients carry prior distributions.
The output is a posterior distribution for each period's effect rather than a single point estimate with a standard error. It is the Bayesian counterpart of the linear panel event study with unit and time fixed effects.
The intuition behind the method
A linear panel event study regresses the outcome on unit and time fixed effects and on indicators for each period relative to treatment, with one period omitted as the reference. The Bayesian version places a prior distribution on each event-time coefficient and updates it with the observed panel. Two practical consequences follow. Coefficients estimated from thin event-time cells are pulled toward the prior instead of being free to take extreme values. Uncertainty is reported as a full posterior distribution, so the analyst can state, for example, the posterior probability that the effect at a given period is positive. Because the prior affects the results, its choice has to be made and checked explicitly.
History
The linear panel event study, with leads and lags around a treatment date inside a two-way fixed-effects model, is the frequentist design that this method extends. Freyaldenhoven et al. (2021) address visualisation, identification and estimation in that linear design. The Bayesian extension is best understood as a general development of this framework, which places prior distributions on the event-time coefficients, rather than as a single method with a documented origin.
When to use it
Use this design when you have panel data in which treatment timing varies across units and a datable event, and you want period-by-period effects with posterior uncertainty. It is particularly useful when event-time cells are sparse, because shrinkage limits extreme pre-trend estimates. It also suits analyses that need to use prior information about plausible effect sizes or that require posterior probability statements rather than p-values. Do not use it when no panel data are available, when treatment timing is continuous rather than discrete, or when you cannot specify and defend priors. It should not be used as a substitute for a credible parallel-trends argument when the trends are clearly divergent even after conditioning on covariates.
Limitations and considerations
- The prior on the event-time coefficients affects the results, and the variance hyperprior adds a further choice; a sensitivity analysis across prior scales is needed to show how much the conclusions depend on them.
- MCMC or variational approximation of the posterior adds computational cost and convergence checks, which grow with the number of units and time periods.
- The Bayesian specification does not establish identification: the parallel-trends assumption behind the event-time coefficients must still be defended on substantive grounds.
- Credible intervals and posterior probabilities have different interpretations from frequentist confidence intervals and p-values, which reviewers trained in frequentist econometrics may not expect.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Each event-time coefficient has a full posterior distribution, so direct probability statements about effect signs and sizes are possible.
- Zero-centred priors on the event-time coefficients shrink noisy estimates from thin event-time cells, which limits the extreme pre-trend values that unshrunk leads can produce.
- Aggregate effects over several post-treatment periods come from the joint posterior draws, so their uncertainty reflects the dependence across periods.
- Priors can encode external information about effect magnitudes, which a standard frequentist event-study regression cannot incorporate directly.
- The event-time indicators are defined relative to each unit's own treatment date, so the specification accommodates units treated at different times.
Applications
- Illustrative: dynamic effects of a staggered regional policy rollout, with a credible interval reported for each event period.
- Illustrative: public-health outcomes such as hospitalisation rates tracked over the periods around a regulatory change, where few observations fall in some event-time cells.
- Illustrative: electoral or governance outcomes in a small country panel before and after an institutional change.
- Illustrative: test-score trajectories across cohorts around a curriculum reform, with posterior summaries for each cohort-period.
How it works
How it works
The outcome for unit i at time t is modelled with unit effects alpha_i and time effects lambda_t, plus one indicator for each event time k, the number of periods from unit i's treatment onset. The formula omits k = -1, so each coefficient beta_k is measured relative to that reference period. The model is a two-way fixed-effects panel regression with error term epsilon_it.
Formula
y_{it} = \alpha_i + \lambda_t + \sum_{k \neq -1} \beta_k \cdot \mathbf{1}[t - E_i = k] + \varepsilon_{it}Each event-time coefficient beta_k receives a normal prior with mean zero and variance sigma^2_beta, and sigma^2_beta receives a half-Cauchy prior with location zero and scale one. The zero-centred prior pulls the coefficients toward zero while letting the data move them away from zero. The scale of one is appropriate only when the outcome has been standardised. For raw outcomes, set the scale in outcome units to a plausible effect size, and check the choice with a prior predictive simulation before estimation.
Formula
\beta_k \sim \mathcal{N}(0,\, \sigma^2_\beta), \quad \sigma^2_\beta \sim \text{Half-Cauchy}(0, 1)By Bayes' rule, the posterior distribution of the coefficients is proportional to the likelihood of the observed outcomes multiplied by the prior. In this hierarchical specification the posterior generally has no closed form, so it is approximated by Markov chain Monte Carlo or variational inference, which return draws for beta and the other parameters. Each event-time effect is then represented by its set of draws rather than one estimate.
Formula
p(\boldsymbol{\beta} \mid \mathbf{y}) \propto p(\mathbf{y} \mid \boldsymbol{\beta})\, p(\boldsymbol{\beta})Under parallel trends, the pre-treatment coefficients (k < -1) should be close to zero. A probabilistic version of this check computes the posterior probability that all pre-period coefficients lie within a band around zero. The width of that band is a choice the analyst must make and justify before inspecting the posterior. Shrinkage pulls the coefficients toward zero, so this probability can be high even when the underlying pre-trends are not flat. The check should therefore be paired with a sensitivity analysis across prior scales and with a comparison to unshrunk event-study estimates.
Post-treatment draws are summarised by posterior means or medians and by credible intervals for each event time. Aggregate effects, such as an average over several post-treatment periods, are computed from the same joint draws, so their uncertainty reflects the dependence across periods. The Bayesian framework does not by itself correct for multiple comparisons across event times. When many event-time statements are reported, state how many were made and interpret the posterior probabilities with that in mind.
Common pitfalls
- Using a strongly concentrated prior on the pre-period coefficients can pull them toward zero and make divergent pre-trends look flat, which gives false confidence in parallel trends.
- Reading a 95% credible interval as a frequentist confidence interval, although the two have different probabilistic meanings.
- Skipping prior predictive checks, so that the chosen priors generate implausible outcomes for the pre-treatment data.
- Treating the shrinkage of pre-period estimates as evidence that pre-trends are flat; shrinkage reduces variance and does not test the assumption.
- Leaving the variance prior unexamined when the posterior is sensitive to its scale, which weakens the robustness of the causal conclusions.
- Reporting posterior summaries without checking convergence, for example without inspecting R-hat, effective sample size and any divergent transitions the sampler reports.
Frequently asked questions
How does this differ from a frequentist panel event study?
Both estimate leads and lags relative to treatment in a two-way fixed-effects panel model. The Bayesian version also places priors on the event-time coefficients and reports a posterior distribution instead of point estimates with standard errors. The main differences are shrinkage of noisy coefficients, fuller uncertainty summaries, and the ability to make direct probability statements about effect sizes.
Which prior should I use for the event-time coefficients?
The formulas on this page use a zero-centred normal prior whose variance has a half-Cauchy prior. The appropriate scale depends on the units of the outcome and on what effect sizes are plausible in your context. Because results can depend on this choice, run the model at several prior scales, including values on both sides of the chosen one, and simulate outcomes from the prior before fitting to check that they are plausible.
Does the Bayesian approach fix problems with staggered treatment timing?
No. Problems with heterogeneous treatment effects under staggered adoption are identification issues that persist regardless of the estimation framework. Bayesian estimation can be combined with heterogeneity-robust estimators from the staggered-adoption literature, but it does not replace them.
How do I test for parallel pre-trends in the Bayesian framework?
Compute the posterior probability that all pre-period event-time coefficients fall within a practical band around zero, for example |beta_k| < delta for all k < -1. The width delta must be chosen and justified before the posterior is examined. A high posterior probability inside this band is consistent with parallel trends, but it is not a test of the assumption itself, and shrinkage toward zero can inflate it. Compare the result with an unshrunk event-study estimate and with alternative prior scales.
What software can fit a Bayesian panel event study?
Custom versions of this model are usually written in general-purpose probabilistic programming tools such as Stan (through RStan or CmdStanR) or PyMC. The brms R package can fit mixed models that approximate parts of this structure. A ready-made implementation of the full specification described here is not assumed, so the model typically has to be specified and checked directly.
Related methods
Sources
Freyaldenhoven, S., Hansen, C., Shapiro, J. M., & Teso, E. (2021). Visualization, Identification, and Estimation in the Linear Panel Event-Study Design. NBER Working Paper No. 29170. National Bureau of Economic Research.
Open publication referenceJakiela, P. (2021). Simple Diagnostics for Two-Way Fixed Effects. Working Paper. Center for Global Development.
Open publication reference