- Introduced by
- Iacus, King & Porro (CEM, 2012); panel extension via Imai, Kim & Wang (2021)
- Year
- 2012 (CEM); 2021 (panel extension)
- Type
- Matching / quasi-experimental
- Family
- Quasi-experimental / causal inference
What does it do?
Panel Data Coarsened Exact Matching adapts Coarsened Exact Matching (CEM), introduced by Iacus, King, and Porro (2012), to repeated observations on the same units.
Treated and control units are matched only when they fall in the same coarsened covariate stratum, and the covariates can include values measured over several pre-treatment periods. The aim is to balance pre-treatment characteristics before estimating a treatment effect.
The intuition behind the method
Coarsened Exact Matching temporarily bins continuous covariates into coarser categories and then requires matched units to share the same bins. In the panel version, the covariates include measurements from several pre-treatment periods, so a stratum reflects part of each unit's history rather than a single baseline value. Strata that contain only treated or only control units are discarded, and the remaining matched sample is used to estimate the average treatment effect on the treated. Because the matching is explicit, the researcher can see which strata are kept and which units are pruned.
History
Coarsened Exact Matching was introduced by Iacus, King, and Porro in a 2012 Political Analysis article, which presents it as a matching method that reduces the need for balance checking after matching, within the monotonic imbalance bounding class of methods. Imai, Kim, and Wang's 2021 American Journal of Political Science article addresses matching for time-series cross-sectional data. It matches each treated observation to control observations from other units in the same period that have an identical treatment history up to a prespecified number of lags, refines the matched set with standard matching and weighting methods, and estimates short- and long-term effects with a difference-in-differences estimator. That procedure differs from the panel version of CEM described on this page.
When to use it
Use Panel Data CEM when you have repeated observations on the same units over time, some units receive a treatment or intervention, and treatment assignment is plausibly related to observed characteristics measured before treatment. It suits designs in which the pre-treatment history of covariates matters for comparability and where the sample is large enough to keep adequate matched units after pruning. Choose it when you want the matching decisions to be explicit and inspectable. Do not use it when the panel has too few pre-treatment periods to establish pre-treatment similarity, when the treated group is so small that pruning would remove most of it, when selection into treatment depends mainly on unobserved factors, or when the cost of matching across many periods and strata is prohibitive.
Limitations and considerations
- Pruning removes every stratum that lacks treated or control units, which can shrink the matched sample and restrict the estimate to the matched subpopulation.
- The choice of cutpoints determines which units share a stratum, and theory rarely fixes it, so different binning schemes can produce different matched samples.
- Selection on unobservables is not addressed: if treatment depends on variables absent from the data, the matched estimate remains biased.
- Adding covariates and pre-treatment periods multiplies the number of strata, so matched units become sparse.
- The estimate is causal only under conditional independence: given the coarsened pre-treatment covariates, treatment is unrelated to untreated outcomes, and matched strata share common support. Neither condition can be confirmed from the observed data alone.
- Sensitivity analysis for hidden bias, which indicates how strong an unobserved confounder would need to be to overturn the estimate, is needed before the matched estimate is given a causal reading.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Balances the coarsened covariates exactly within matched strata, without estimating a propensity model or specifying a parametric selection equation.
- Matching decisions are explicit: the researcher can list which strata are kept and which units are pruned.
- Adding unit fixed effects after matching targets time-invariant unobserved heterogeneity that the matching covariates do not capture.
- Because matched treated and control units overlap on the coarsened covariates by construction, the comparison depends less on the functional form of a regression adjustment.
Applications
- Evaluating the effect of firm-level policy adoption on performance using multi-year accounting panel data.
- Estimating the causal impact of a public health intervention on patient outcomes across hospital panels.
- Assessing educational programme effects on student achievement when matched on prior test scores and school characteristics.
- Measuring the employment effects of labour-market reforms using country-level panel data matched on pre-reform labour-market indicators.
- Studying the effect of media exposure on political behaviour across individuals observed over multiple election cycles.
How it works
How it works
Each pre-treatment covariate is recoded into coarser bins, such as quantile-based bins (quartiles or deciles) or substantively chosen cutpoints. This converts continuous variables into discrete strata while keeping the ordering of values. In the panel version, covariates measured at several pre-treatment periods are included, so the strata can reflect each unit's recent history rather than a single baseline snapshot.
Units are grouped into strata defined by the joint combination of their coarsened covariate values. A treated unit and a control unit are matched if and only if they fall in exactly the same stratum. Strata containing only treated or only control units are discarded, pruning the sample to a region of common support and guaranteeing exact balance on the coarsened covariates within matched strata.
Within each matched stratum s, each control unit receives the weight |T_s| / |C_s|, the ratio of treated to control units in that stratum.
Formula
w_i = \frac{|\mathcal{T}_s|}{|\mathcal{C}_s|} \cdot \mathbf{1}[i \in \mathcal{C}_s]The estimate averages, over all treated units, the difference between each treated outcome and the mean outcome of its matched controls, so each treated unit enters with equal weight. The stratum control weights from the previous step do not appear in this expression.
Formula
\hat{\tau}_{ATT} = \frac{\sum_{i \in \mathcal{T}} (Y_i - \bar{Y}_{\mathcal{C}(i)})}{|\mathcal{T}|}Common practice in panel settings is to add unit fixed effects or use a within-unit estimator after matching, so that time-invariant differences not captured by the matching covariates are partly absorbed. Standard errors are often clustered at the unit level to allow for serial correlation within units.
Common pitfalls
- Choosing bins that are too fine approaches exact matching on raw values and may prune most of the sample; bins that are too coarse leave meaningful imbalance within strata.
- Reporting ATT from the matched sample without clarifying which units were pruned can mislead about the scope of the causal claim.
- Ignoring within-unit serial correlation when computing standard errors commonly leads to understated uncertainty in panel settings; clustering at the unit level is a frequent remedy, though the appropriate level depends on the design and the number of clusters.
- Treating the matched estimate as valid without a sensitivity analysis for hidden bias overstates confidence in the causal interpretation.
Frequently asked questions
How does CEM differ from propensity score matching in a panel context?
CEM matches units by requiring them to fall in the same coarsened covariate bins, so balance on the binned covariates holds by construction and no propensity model is estimated. Propensity score matching collapses all covariates into one estimated score and matches on it, which can leave residual imbalance on individual covariates. In the panel version described here, several pre-treatment values of a covariate can enter the strata definition directly.
What happens when many units are pruned?
Pruning improves internal validity by ensuring treated and control units are genuinely comparable, but it reduces the number of units in the analysis. The ATT estimate then applies only to the matched subpopulation, not to all treated units. Researchers should report the fraction of treated units retained and assess whether the matched sample is representative of the broader population they care about.
Do I still need fixed effects after matching?
Matching on pre-treatment covariates reduces observable imbalance, but time-invariant unobserved heterogeneity may still differ across units. Adding unit fixed effects in the outcome model after matching provides an additional layer of control, so the combination is often used for panel data. The two approaches target different sources of confounding.
How many pre-treatment periods should I include in the matching strata?
Including more pre-treatment periods helps capture the pre-treatment trajectory, but it increases the number of strata and so accelerates pruning. Researchers typically balance these by including enough lagged periods to describe the trend and by adjusting for residual trend differences within units, for example through within-unit differencing.
What is the right number of bins for coarsening?
There is no universal rule. Common approaches use quantile-based bins (quartiles or deciles), substantively meaningful cutpoints, or automated selection based on data density. Researchers should report sensitivity of results to alternative binning choices as part of the robustness analysis.
Related methods
Sources
Iacus, S. M., King, G., & Porro, G. (2012). Causal Inference without Balance Checking: Coarsened Exact Matching. Political Analysis, 20(1), 1-24.
Open DOI referenceImai, K., Kim, I. S., & Wang, E. H. (2021). Matching Methods for Causal Inference with Time-Series Cross-Sectional Data. American Journal of Political Science, 67(3), 587-605.
Open DOI reference