- Introduced by
- Jens Hainmueller
- Year
- 2012
- Type
- Preprocessing / reweighting estimator
- Family
- Quasi-experimental / causal inference
What does it do?
Entropy balancing is a reweighting method that assigns weights to control-group units so that their weighted covariate moments exactly match those of the treated group.
Introduced by Hainmueller (2012) for observational studies with binary treatments, it targets balance directly rather than through an estimated propensity score that must be refitted and checked. It is typically used as a preprocessing step before estimating the effect of a policy on the treated.
The intuition behind the method
Propensity-score methods aim for covariate balance indirectly: a treatment model is fitted, balance is checked, and the model is often re-specified until balance improves. Balance may remain only approximate, and residual imbalance can bias the estimated effect. Entropy balancing instead solves a constrained optimisation problem. It chooses control-unit weights that satisfy prespecified balance conditions on covariate means, and optionally on variances and higher moments, exactly. Among all weight vectors that meet those conditions, it selects the one with maximum entropy, meaning the weights are spread as evenly as the constraints allow rather than concentrated on a few units. This limits extreme weights, but it does not remove the need to check how concentrated the final weights are.
History
Entropy balancing was introduced by Jens Hainmueller in a Political Analysis article (volume 20, issue 1, 2012); the article first appeared online in 2011. It applies the maximum-entropy principle to reweighting: balance conditions are imposed as constraints, and among the weight vectors that satisfy them, the one closest to uniform is chosen. The original abstract emphasises that the method removes the need for continual balance checking and for iterative searching over propensity-score models. A later analysis by Zhao and Percival examined the method's theoretical properties, including its doubly robust behaviour.
When to use it
Use entropy balancing when treatment is binary, the data are observational, and the goal is to balance pre-treatment covariate moments without fitting a propensity-score model. It suits policy evaluations with a moderate number of covariates, a treated group that is not very small, and reasonable overlap, meaning that comparable control units exist. It is also convenient when repeated cycles of propensity-model refitting and trimming would be impractical. Avoid it when overlap is poor, because few comparable controls produce extreme weights and an unstable estimate. Avoid the standard version for continuous or multi-valued treatments, which need an extension designed for them. With many covariates and no dimension reduction, the balance constraints may be infeasible or the weights may be unstable.
Limitations and considerations
- Balance is guaranteed only on the moments explicitly constrained; unconstrained moments and unmeasured confounders remain unbalanced.
- Overlap still matters: if few control units resemble the treated group, the weights concentrate and the variance of the estimate grows.
- The standard formulation is for binary treatments; continuous or multi-valued treatments require an extension.
- Choosing which moments to constrain, particularly with many covariates, is a discretionary decision that can affect the result.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Achieves exact balance on the chosen covariate moments and avoids the iterative search over propensity models that can otherwise be needed to approach balance.
- Does not require a correctly specified propensity-score model to obtain balance, because the optimisation targets the balance conditions directly.
- Doubly robust in the sense reported by the Zhao paper: the estimator is consistent if either the linear outcome model or the logistic propensity model is correctly specified, and it reaches the semiparametric efficiency bound when both are correct.
- The convex formulation with a strictly convex objective gives a unique set of weights when a feasible solution exists, so results do not depend on random starting values.
- Can constrain variances and higher moments alongside means, so balance can extend beyond the mean where the analysis requires it.
Applications
- Evaluating the causal effect of a social policy or public programme, such as job training or cash transfers, on outcomes such as earnings or employment.
- Assessing the impact of a tax reform or regulatory intervention on business outcomes using observational firm-level data.
- Preprocessing observational data before a difference-in-differences or regression analysis to reduce baseline covariate differences between treated and untreated regions or cohorts.
- Estimating health-policy effects, such as those of Medicaid expansion, on health utilisation or outcomes using administrative records.
- Political-science studies of electoral or legislative interventions where random assignment is not possible.
- A variant of the same constraint approach that reweights a control sample so that its covariate moments match known moments of a target population.
How it works
How it works
The analyst chooses the pre-treatment covariates and the moments to constrain. At a minimum this is usually the weighted control-group mean of each covariate set equal to the treated-group mean. Variances, and where needed higher moments, can be added as further constraints. The method guarantees exact balance only on the moments that are constrained; unconstrained moments carry no such guarantee.
Formula
\sum_{i: W_i=0} w_i h_r(X_i) = m_r, \quad r = 1,\ldots,RWeights for the control units are chosen to minimise the sum of w times ln(w), subject to the balance constraints and to the weights summing to one. This expression is the negative of the entropy of the weights, so minimising it maximises entropy, and the solution is the most evenly spread weight vector that satisfies the constraints. The problem is convex, so it can be solved with standard Lagrangian or dual methods. As written, the objective contains no base weights, so it corresponds to a uniform starting point.
Formula
\min_{w} \sum_{i: W_i=0} w_i \ln(w_i) \quad \text{s.t. balance constraints and } \sum w_i = 1The effect on the treated (ATT) is estimated as the treated-group mean outcome minus the entropy-weighted mean outcome of the control group. Because the weights enforce balance on the constrained covariates, the weighted control mean is intended to stand in for the treated group's counterfactual on those covariates. Zhao and Percival (2017) show that this estimator is doubly robust: it is consistent for the ATT if either the linear outcome model or the logistic propensity model is correctly specified, and it reaches the semiparametric efficiency bound when both are correct. The Hainmueller (2012) source does not make this claim.
Formula
\hat{\tau}_{ATT} = \frac{1}{n_1}\sum_{i: W_i=1} Y_i - \sum_{i: W_i=0} \hat{w}_i Y_iAfter weighting, compare the standardised mean differences (SMDs) for each covariate before and after reweighting. For constrained means, post-weighting SMDs should be zero up to optimiser tolerance, because the constraints force the weighted control means to equal the treated means. Any material residual on a constrained mean indicates that the optimisation did not converge or that the constraints were not applied. Also inspect the distribution of the weights. A few very large weights on a small set of control units indicate limited overlap, and the ATT may then rest on very few observations.
The estimate can be a plain weighted difference in means, as in the estimator above. A weighted regression of the outcome on treatment and the remaining covariates, fitted with the entropy weights, can be reported as an additional specification for precision or as a sensitivity check; the double robustness described above does not depend on it. Standard errors can be computed with sandwich formulas or by bootstrap, and with panel or clustered data the variance estimator should respect the clustering.
Common pitfalls
- Constraining many higher-order moments with a small control sample can make the problem infeasible or produce weights concentrated on very few units.
- Reading exact balance on observed covariates as evidence against unmeasured confounding: reweighting does not address confounders that are not measured.
- Reporting the estimate without inspecting the weights: a few extreme weights signal poor overlap and an unreliable ATT.
- Omitting a before-and-after table of SMDs, which readers need in order to judge whether the reweighting worked.
Frequently asked questions
How is entropy balancing different from propensity-score weighting?
Propensity-score weighting estimates the probability of treatment and uses it to weight units; balance then depends on that model being correctly specified and is usually only approximate. Entropy balancing imposes the balance conditions directly through a constrained optimisation and never estimates a propensity score. It achieves exact balance on the constrained moments without relying on a propensity model, although its estimates can still be biased by unmeasured confounding or poor overlap.
What moments should I constrain?
At a minimum, constrain the means of all pre-treatment covariates you believe are related to both treatment and outcome. Adding variance constraints improves balance on the covariate distributions beyond their central tendency. Skewness constraints are sometimes added for highly skewed variables. Start with means, and add higher moments if post-weighting SMDs remain large.
Is entropy balancing doubly robust?
The Zhao and Percival (2017) paper in the reference list shows that the entropy-balanced estimator is doubly robust: it remains consistent for the ATT if either the linear outcome regression or the logistic propensity regression is correctly specified. The original Hainmueller (2012) abstract does not make this claim.
What sample size do I need?
No fixed ratio of control to treated units guarantees that the problem is feasible. The control pool needs to be large enough relative to the number of balance constraints. If it is small, the constraints may be infeasible or the weights may be highly variable. Check whether the optimiser converges and inspect the weight distribution.
Can I use entropy balancing with panel data?
Standard entropy balancing matches covariate moments across units at a single point in time. With panel data, you must decide which pre-treatment observations define each unit's covariates. Using the resulting weights in a difference-in-differences or panel model requires separate justification of the parallel-trends assumption and of how the weights enter the model.
Related methods
Sources
Hainmueller, J. (2012). Entropy Balancing for Causal Effects: A Multivariate Reweighting Method to Produce Balanced Samples in Observational Studies. Political Analysis, 20(1), 25-46.
Open DOI referenceZhao, Q., & Cooney, D. (2017). Entropy Balancing is Doubly Robust. Journal of Causal Inference, 5(1).
Open DOI reference