Coarsened Exact Matching (CEM)

Statistics
Introduced by
Iacus, King, & Porro
Year
2011-2012
Type
Matching / causal inference
Family
Quasi-experimental / causal inference

What does it do?

Coarsened Exact Matching (CEM) is a preprocessing method that balances treated and control units by temporarily coarsening continuous covariates into bins, exactly matching units within the resulting strata, and discarding unmatched units.

Iacus, King, and Porro (2011, 2012) introduced it as a member of the monotonic imbalance bounding (MIB) class of matching methods. Because it does not require a propensity score model, any estimator can then be applied to the matched sample.

The intuition behind the method

Suppose treated and control participants differ in age, income, and education. Rather than fitting a single propensity score model, whose fit on each covariate can go unchecked, CEM first recodes each continuous covariate into a small number of broad bins. It then keeps only the strata, defined by the combination of bin values across all covariates, that contain at least one treated and one control unit. Units in strata with members from only one group are discarded. Within each retained stratum the covariates fall in the same bins, so the coarsening choices determine how much within-bin difference is tolerated, and the analyst sets those choices directly.

History

Iacus, King, and Porro introduced the monotonic imbalance bounding (MIB) class of matching methods in a 2011 article in the Journal of the American Statistical Association, and CEM is developed within that class. Their 2012 article in Political Analysis presents CEM, its properties, and open-source software. CEM was proposed as an alternative to propensity score matching in which balance is enforced directly on the observed covariates.

When to use it

Choose CEM when you have a binary treatment, cross-sectional or panel data, and a moderate number of pre-treatment covariates that can be meaningfully binned, whether continuous, categorical, or mixed. It suits analyses in which you want direct, auditable control over residual imbalance on each covariate rather than trust in a propensity score model. Prefer it to nearest-neighbour propensity score matching when balance on individual covariates matters for the question. Do not use it when the covariate set is large relative to the sample, because the number of strata grows with the cross-product of bins and most units may be pruned. It is also unsuitable for a continuous treatment, since the method as described compares treated and control groups.

Limitations and considerations

  • Curse of dimensionality: as covariates or bins are added, the cross-product of cells grows quickly, most strata become one-sided, and a large share of units is pruned, reducing sample size and statistical power.
  • The results depend on where the bin boundaries are placed, and the researcher chooses them, so different reasonable coarsenings can yield different matched samples and estimates.
  • Because unmatched units are discarded, the matched sample may differ from the full population, and the ATT applies to the retained treated units rather than to all treated units.
  • CEM balances only the covariates included in the coarsening; any confounder that is omitted from the matching set remains unaddressed.
  • Causal interpretation requires selection on observed covariates: all confounders must be included in the matching set, since CEM balances only the variables it is given. It also requires overlap, meaning each retained stratum contains both treated and control units. Balance on the matched covariates does not test either condition.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Under monotonic imbalance bounding, imbalance on each covariate is bounded in terms of the chosen coarsening, so the analyst can inspect and bound residual imbalance variable by variable. Within-bin differences are not eliminated and should be checked.
  • No propensity score model is estimated, so there is no score specification that could be misspecified and drive the matches.
  • The coarsening choices are explicit and can be reported and reproduced exactly, since they are the only tuning decisions in the matching step.
  • Categorical and continuous covariates can be matched together, because categorical variables are used directly and only continuous ones are binned.
  • Units are retained only if their exact stratum contains both treated and control members, so every discarded unit can be identified and examined by its stratum.

Applications

  • Comparing treated and control units when the matching set is small, each covariate can be binned in a meaningful way (for example, age bands, education levels, or regions), and enough units fall in each cell.
  • Preprocessing observational data so that residual covariate imbalance can be reported for each variable before the treatment effect is estimated.
  • Sensitivity checks in which the analyst re-runs the analysis under alternative coarsenings to see whether the estimated ATT changes with the bin boundaries.
  • Preparing a matched sample for a subsequent regression or difference-in-differences analysis, with the stratum weights carried through to the outcome model.

How it works

How it works

1

Each continuous covariate is temporarily recoded into a small number of bins, either chosen by the analyst or set automatically by the software. Categorical variables are left as they are. The coarsening serves only to form the matching strata; the original values are retained for estimation.

2

Units are grouped into strata defined by the full cross-product of the coarsened covariate cells. A stratum is retained only if it contains at least one treated unit and at least one control unit. Strata containing units from only one group are dropped.

3

All treated and control units in unmatched strata are removed. The remaining units form the matched sample. Within this sample, imbalance on each covariate is bounded in terms of the coarsening chosen, but differences within bins remain.

4

In the matched sample, an effect estimate is computed as a stratum-weighted average of within-stratum differences in outcome means, using the weights w_s in the formula above. The weights follow the authors' weighting scheme for the average treatment effect on the treated (ATT), and the formula is a summary of that scheme rather than a full specification. Other estimators, such as weighted regression, can also be applied to the matched sample with these weights.

Formula
\hat{\tau}_{ATT} = \frac{\sum_{s} w_s (\bar{Y}_{T,s} - \bar{Y}_{C,s})}{\sum_{s} w_s}

Common pitfalls

  • Choosing very fine bins can leave few strata with both treated and control units, discarding most of the sample and leaving a small matched dataset with high variance.
  • Choosing very coarse bins can make the matched data look balanced while leaving substantial within-bin differences between treated and control units.
  • Adding many matching covariates without checking the fraction of units that remain matched can lead to severe pruning, so the matched sample may no longer represent the original one.
  • Estimating the effect in the matched sample without the stratum weights w_s, as the formula in the mechanics section requires, gives an estimate that does not correspond to the ATT.
  • Treating the matched-sample estimate as representative of the full sample, without examining whether the pruned units differ systematically from the matched ones.

Frequently asked questions

How does CEM differ from nearest-neighbour propensity score matching?

Nearest-neighbour propensity score matching matches on a single scalar, the propensity score, which can hide imbalance on individual covariates. CEM matches directly on the covariates within coarsened bins, so balance on each variable can be checked and bounded. CEM also does not require a score model.

How should I choose the coarsening bins?

Bins can be chosen from substantively meaningful cut-points, such as age groups, or by using the automatic coarsening in the software. Check the resulting multivariate imbalance statistic (L1), where lower values indicate that treated and control units are more similar across the coarsened cells, together with the number and share of matched units. Compare several alternative coarsenings to see whether the estimate is robust.

What happens to units that are not matched?

They are excluded from the analysis. This is part of the design, since CEM trades sample size for balance. If too large a fraction is pruned, use a coarser matching resolution or consider a weighting method, such as entropy balancing or inverse probability weighting, which retains all units.

Can I use CEM with panel data or difference-in-differences?

CEM can be used as a preprocessing step before a difference-in-differences or panel regression, so that treated and control units are comparable on pre-treatment characteristics. Matching does not establish the parallel trends assumption on which difference-in-differences relies, and it does not test that assumption. Parallel trends must be justified separately for the study design.

What software implements CEM?

The cem package in R is the implementation associated with the method. The 2012 article also reports open-source software for Stata and SPSS. Check the documentation of each package for the coarsening and weighting options it provides.

Related methods

Sources

  1. Iacus, S. M., King, G., & Porro, G. (2012). Causal Inference without Balance Checking: Coarsened Exact Matching. Political Analysis, 20(1), 1-24.

    Open DOI reference
  2. Iacus, S. M., King, G., & Porro, G. (2011). Multivariate matching methods that are monotonic imbalance bounding. Journal of the American Statistical Association, 106(493), 345-361.

    Open DOI reference