- Introduced by
- Hainmueller (2012) for entropy balancing; Athey & Imbens (2016) for heterogeneous effect estimation
- Year
- 2012-2016
- Type
- Causal inference / heterogeneous effect estimation
- Family
- Quasi-experimental / causal inference
What does it do?
Heterogeneous treatment effect entropy balancing combines entropy balancing (Hainmueller, 2012), a reweighting method that gives control units weights so that their covariate moments match those of the treatment group, with heterogeneous-effect estimation (Athey and Imbens, 2016), which asks how a treatment effect varies across subgroups or individuals.
The weights are obtained by solving a constrained optimisation problem rather than by fitting a propensity model. The balanced sample is then used to examine conditional average treatment effects across moderating variables.
The intuition behind the method
Standard entropy balancing produces one average effect for the treated group by adjusting control-group weights so that their covariate distribution mirrors the treatment group. Heterogeneous-effect analysis asks a further question: does the effect differ by age, income, region, or another moderator? Once the measured covariates are balanced, differences in effect across subgroups are easier to interpret than in a raw comparison, though only with respect to the covariates and moments that were balanced. Balance on specified moments does not establish unconfoundedness. The combination is most useful when a propensity model is hard to specify and subgroup effects are the substantive question.
History
Hainmueller (2012) introduced entropy balancing as a reweighting method that achieves exact covariate balance on specified moments without iterative searching over propensity score models. Athey and Imbens (2016) proposed recursive partitioning for heterogeneous causal effects, using honest estimation in which one sample defines the subgroups and another estimates effects within them. Combining the two is an applied extension of these works rather than a single originating paper.
When to use it
Choose this approach when (1) the data are observational with a binary treatment, (2) the question concerns whether the effect differs across subgroups or individual characteristics rather than only the average effect, (3) a propensity model is hard to specify credibly and the covariates and moments to balance can be named in advance, and (4) each subgroup of interest contains enough treated and control units to estimate its own weighted comparison. Do not use it for continuous treatments without a suitable extension, when the sample is too small to support the subgroups, or when the main concern is unmeasured confounding, because entropy balancing adjusts only for measured covariates.
Limitations and considerations
- Only measured covariates are balanced; balance on the specified moments does not establish unconfoundedness, and unmeasured differences between treated and control units remain a source of bias that the weights cannot remove.
- Each subgroup needs its own treated and control units. With many moderators or fine partitions, the weighted subgroup comparisons become imprecise and multiple testing becomes a serious concern.
- Honest estimation estimates effects on a smaller sample than the one used to define the partition; Athey and Imbens report a mean squared error cost of 7-22% for their preferred method in simulations, in exchange for valid coverage.
- The choice of covariate moments to balance is an analyst decision that changes the weights and the estimates, and it needs justification.
- Where treated and control units overlap poorly in covariate space, the constrained problem may fail to converge, and the combination of balancing and a heterogeneity search adds steps (moment choice, moderator choice, partition rule) that each affect the results.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Imposes exact balance on the covariate moments the analyst specifies, so balance on those moments does not depend on iteratively refitting a propensity model.
- The weights can be carried into heterogeneity estimators that accept observation weights, so the same balanced sample supports subgroup analyses.
- The weights and the balance achieved on each specified moment can be inspected directly before any outcome is analysed.
- Balances means, variances and higher moments of each covariate together, which a single propensity score used for matching does not directly target.
- In tree-based heterogeneity analysis, Athey and Imbens' honest estimation uses one sample to define subgroups and a separate sample to estimate effects within them, which their simulation study links to nominal coverage of 90% confidence intervals, against 74% to 84% for non-honest approaches.
Applications
- Examining whether a training programme's effect on earnings differs by baseline education, after reweighting non-participants to resemble participants on measured characteristics.
- Assessing whether a policy's effect varies by firm size in administrative records, with control firms reweighted to match treated firms.
- Testing whether an intervention's effect differs by a baseline characteristic in an observational health database, with covariate moments balanced before subgroup estimation.
- Exploring which voter segments respond differently to a campaign activity in observational data, with balance checked within each segment.
How it works
How it works
Entropy balancing chooses control-unit weights that stay as close as possible to uniform (or to specified base weights) in the entropy sense, subject to the weights summing to one and the weighted control covariate moments equalling the treatment-group moments. The constraints can include means, variances and, if specified, higher moments. No propensity model is estimated. Balance is guaranteed only for the covariates and moments the analyst names; it does not remove bias from unmeasured covariates or from moments that were not included.
Formula
\min_{w} H(w) = \sum_{i \in C} w_i \ln\!\left(\frac{w_i}{q_i}\right) \quad \text{s.t.} \quad \sum_{i \in C} w_i = 1, \; \sum_{i \in C} w_i c_r(X_i) = m_r, \; r=1,\dots,R, \; w_i>0After weighting, the effect for the treated group is estimated by comparing the treated outcome mean with the entropy-weighted control outcome mean. The estimand is the average treatment effect on the treated (ATT), not the average effect for the whole population. Standard errors should account for the fact that the weights are estimated, for example with a bootstrap that re-solves the balancing problem in each replicate.
Formula
\hat{\tau}_{ATT} = \frac{1}{n_T}\sum_{i \in T} Y_i - \sum_{i \in C} w_i Y_iTo examine heterogeneity, split the sample by a moderating variable (such as gender or income group) and estimate the weighted effect within each subgroup, or use a flexible estimator that accepts observation weights. Full-sample weights do not guarantee balance inside a subgroup, so recompute the entropy weights within each subgroup (or check the balance achieved there) and report it. Each subgroup must contain enough treated and control units.
Formula
\hat{\tau}_g = \frac{1}{n_{T,g}}\sum_{i \in T,\, M_i=g} Y_i - \sum_{i \in C,\, M_i=g} w_i^{(g)} Y_iEffect modification can be tested with a treatment-by-moderator interaction in a weighted regression, where the test of the interaction coefficient is the heterogeneity test, or by comparing subgroup estimates. Use bootstrap standard errors that re-estimate the weights. When many subgroups are examined, apply a multiple-testing correction such as Bonferroni (familywise error) or Benjamini-Hochberg (false discovery rate). Plotting the distribution of estimated subgroup effects helps separate systematic heterogeneity from noise, but it does not by itself establish that a difference is real.
Formula
Y_i = \alpha + \beta D_i + \gamma M_i + \delta (D_i \times M_i) + \varepsilon_i \quad \text{(weighted by } w_i\text{; test } H_0:\delta=0)Common pitfalls
- Running many subgroup comparisons without pre-specification or a multiple-testing correction, and reporting only the subgroups that reach significance.
- Balancing means but not variances or higher moments when those differences matter, leaving residual imbalance in the tails of the covariate distributions.
- Interpreting heterogeneity as causal when the moderating variable is itself affected by the treatment (post-treatment conditioning).
- Reporting subgroup effects without the balance achieved within each subgroup, since weights computed on the full sample do not guarantee balance inside a small subgroup.
- Applying the method when treatment-control overlap is very poor, in which case the weights become unequal and standard errors grow.
Frequently asked questions
How does entropy balancing differ from propensity score weighting?
Propensity score weighting estimates the probability of treatment from a regression model and uses the estimated probabilities as weights. Entropy balancing does not fit that model. It finds weights directly by solving an optimisation problem that enforces balance on the specified covariate moments. If a propensity model is misspecified, propensity weights can be biased; entropy balancing does not depend on that model being correct, although it is still limited to the moments that were balanced.
Can I use entropy balancing with a continuous treatment?
Standard entropy balancing is designed for binary treatments. Extensions to continuous or multi-valued treatments have been proposed but are less established. For a continuous treatment, weighting based on a generalised propensity score is a more standard route.
How do I test whether subgroup effects are real or noise?
Include a treatment-by-moderator interaction term in a weighted regression and test it. When many subgroups are examined, apply a multiple-testing correction such as Bonferroni or Benjamini-Hochberg. Pre-registering which subgroups will be examined before seeing the data is the strongest protection against false discoveries.
What sample size is needed?
There is no single minimum. The overall weighted comparison can be estimated with modest samples in each group, but each subgroup must contain enough treated and control units to support its own weighted comparison. The number needed depends on the expected effect size and on how many subgroups are examined, so a power calculation is the appropriate guide.
What if convergence fails during entropy balancing?
Convergence failure usually signals poor overlap between treated and control units in the covariate space. Remedies include trimming units with extreme covariate values, relaxing the balance constraints to fewer moments, or switching to a method that explicitly models limited overlap, such as overlap-weighted estimation.
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 referenceAthey, S., & Imbens, G. W. (2016). Recursive partitioning for heterogeneous causal effects. Proceedings of the National Academy of Sciences, 113(27), 7353-7360.
Open DOI reference