Dynamic Entropy Balancing

Statistics
Introduced by
Hainmueller (2012) for static entropy balancing; extended to dynamic settings by Blackwell and Glynn (2018) and subsequent methodologists
Year
2012-2018
Type
Causal inference / weighting estimator
Family
Quasi-experimental / causal inference

What does it do?

Dynamic entropy balancing refers to a proposed extension of entropy balancing, a reweighting method for observational data, to settings where treatment changes over time and earlier treatment can affect later covariates.

Entropy balancing itself (Hainmueller, 2012) was introduced for a single binary treatment: comparison units are reweighted so that their covariate moments match those of the treated group. The dynamic version is not a single standardised procedure. The sources on this page establish only the static method and the related inverse-probability-weighting framework for time-varying treatments, so any dynamic analysis must state and justify its construction explicitly.

The intuition behind the method

Static entropy balancing reweights comparison units so that chosen covariate moments (means, variances, and possibly higher moments) match the treated group exactly, without fitting a propensity model. With a time-varying treatment, past treatment can change covariates that also predict later treatment, so a one-time reweighting may not remove this feedback. A natural extension applies the same moment-matching logic period by period, conditioning on the treatment history observed so far. This period-by-period construction is a proposed extension, not an established estimator with validated properties on this page; the analyst must justify it, including how weights from successive periods are combined. Whether the estimates are valid also depends on sequential ignorability, which the balancing step cannot verify.

History

Entropy balancing was introduced by Hainmueller (2012; available online in 2011) for observational studies with binary treatments, where unit weights are chosen by maximum-entropy reweighting so that covariate moments match prespecified targets. A dynamic extension to time-varying treatments is not documented in the cited sources. Blackwell and Glynn (2018) address causal inference with time-series cross-sectional data under selection on observables, using inverse probability weighting and structural nested mean models; they provide a related framework for lagged treatments and are not a source for entropy balancing.

When to use it

Consider this approach when you have panel or longitudinal data, a treatment that changes over time, and time-varying covariates that past treatment may influence, so that a single-period adjustment would be insufficient. It fits situations where sequential ignorability is defensible, meaning all important time-varying confounders are measured, and where you prefer moment matching to fitting a propensity model at every period. The cited entropy balancing source covers a single binary treatment, so use with multi-valued or continuous treatments needs separate justification. Do not use it when treatment is assigned once, where standard entropy balancing applies. Avoid it when important time-varying confounders are unmeasured, since no reweighting scheme corrects for unobserved confounding.

Limitations and considerations

  • Relies on sequential ignorability (no unmeasured time-varying confounders), which cannot be tested from the data alone.
  • Weights can become extreme when treatment histories differ strongly on covariates or when overlap is weak, which inflates variance and reduces the effective sample size.
  • Each additional moment constraint narrows the set of feasible weights; too many constraints relative to the comparison pool can make the optimisation infeasible.
  • The sources on this page do not specify a standard dynamic implementation, so choices such as how treatment histories are grouped and how periods are ordered must be justified and reported.
  • The sources on this page do not establish a variance estimator for the weighted effect; if bootstrapping is used, its validity for the chosen weighting should be checked.

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

Strengths

  • Imposes exact balance on the moments named in the constraints, rather than balance that is only approximate after fitting a propensity model.
  • Avoids iterative searching over propensity specifications, because the balance conditions are part of the optimisation itself.
  • Lets the analyst choose which covariate moments to balance, including variances and higher-order moments, so the balance targets are explicit.
  • Period-by-period standardised mean differences give a direct check on whether the time-varying covariates are balanced.

Applications

  • Illustrative: estimating the cumulative effect of repeated exposure to a policy or program (e.g., multi-year job training) on long-run earnings.
  • Illustrative: evaluating the impact of time-varying medical treatments or medication regimens on patient health outcomes in clinical panel data.
  • Illustrative: studying the effect of persistent versus intermittent firm-level investments on productivity using corporate panel data.
  • Illustrative: assessing the electoral or governance consequences of leaders holding office across multiple periods with varying policy decisions.
  • Illustrative: estimating dose-response relationships for environmental exposures that change over time in epidemiological cohort studies.
  • Illustrative: causal analysis of repeated participation in educational interventions on academic achievement trajectories.

How it works

How it works

1

Define each unit's treatment history as the sequence of treatment values received up to each time point. The target quantity is the effect of a specific treatment sequence (for example, always treated versus never treated) on the outcome at the end of follow-up. History matters because covariates affected by past treatment can also predict later treatment, so adjusting only for current covariates can leave confounding in place or introduce post-treatment bias.

2

The static entropy balancing problem is: choose non-negative weights w_i for the comparison units that minimise the divergence of the weights from base weights q_i (uniform if none), the sum of w_i log(w_i/q_i), subject to the weights summing to one and to moment constraints that make the reweighted comparison group match the treated-group moments m_r. The printed mechanics formula is a simplified form with no base weights, normalisation constraint or group indexing. A dynamic application would set up a problem of this kind at each period, with constraints on pre-specified moments of the time-varying covariates within the relevant treatment-history group. This is a proposed extension without established sources here, so the period-specific form must be written out and justified before use.

Formula
\min_{w} \sum_i w_i \log\left(\frac{w_i}{q_i}\right) \quad \text{s.t.} \sum_i w_i = 1,\; w_i \ge 0,\; \sum_i w_i c_r(X_i) = m_r,\; r=1,\ldots,R
3

The static problem yields a single weight vector. If period-specific weights are multiplied to form a final weight, as in the sequential factorisation used for inverse probability weights, state the product and how it is normalised (for example, within each treatment-history group so that weights sum to one). The validity of such a product for entropy-balancing weights is not established on this page and must be justified by the analyst. Without this statement the reader cannot tell which weight the estimate uses.

4

Apply the final weights in a weighted outcome regression or a weighted-mean contrast: the weighted mean outcome in the group following treatment sequence d, minus the weighted mean outcome in the group following sequence d', with weights normalised within each history group (weighted totals divided by the sum of weights). The estimator's validity rests on the weights balancing the confounders that drive treatment, which in turn requires sequential ignorability. Consistency is not derived on this page, so treat it as an assumption to check rather than an established result. No variance estimator is established here either, so validate inference (for example by simulation) before reporting intervals.

Formula
\hat{\tau} = \frac{\sum_{i \in G(\bar{d})} w_i^* Y_i}{\sum_{i \in G(\bar{d})} w_i^*} - \frac{\sum_{i \in G(\bar{d}')} w_i^* Y_i}{\sum_{i \in G(\bar{d}')} w_i^*}
5

Compute weighted standardised mean differences for the balanced covariates at each period you adjust for. Large residual differences indicate the constraints did not achieve balance, and highly variable weights suggest weak overlap between treatment histories. Either case calls for revising the moment constraints or stating explicitly how extreme weights are handled.

Common pitfalls

  • Applying static entropy balancing when treatment varies over time, which ignores the feedback from past treatment to later covariates and can bias the causal estimate.
  • Failing to examine period-by-period covariate balance diagnostics, which leaves residual imbalance undetected.
  • Using the final weights in an outcome model without checking that the outcome model is correctly specified.
  • Ignoring or failing to report extreme-weight trimming decisions: trimming reduces variance but can introduce bias.
  • Treating dynamic entropy balancing as interchangeable with marginal structural models. The two obtain weights differently (moment matching versus modelled treatment probabilities), so their estimates can differ and each should be reported with its assumptions.

Frequently asked questions

How does dynamic entropy balancing differ from a marginal structural model?

Both handle time-varying treatments by weighting, but they obtain the weights differently. Marginal structural models weight by inverses of modelled treatment probabilities at each period. Entropy balancing chooses weights by solving a moment-matching problem, so no treatment model is fitted. Both rely on sequential ignorability, and whether the dynamic version gives similar estimates in practice depends on the implementation, which should be reported.

What is sequential ignorability and when is it reasonable?

Sequential ignorability requires that, at each period, treatment assignment is independent of potential outcomes given the observed treatment history and measured time-varying covariates. It is reasonable when all important confounders are measured and updated over time. It fails if important unmeasured factors, such as unrecorded health shocks or unobserved firm characteristics, influence both treatment and outcomes.

How do I choose which covariate moments to balance?

Start with the means of the time-varying covariates and any lagged outcomes included as controls. Add variance and cross-product constraints for covariates suspected of non-linear relationships with treatment or outcome. More constraints improve balance on those moments but can make the weights more extreme and the optimisation harder to solve.

Can dynamic entropy balancing handle continuous or multi-valued treatments?

The cited entropy balancing source addresses binary treatments. Extending the balance conditions to multi-valued or continuous treatments may be possible in principle, but the sources on this page do not establish it, so any such analysis needs its own justification and balance checks.

What sample size is needed?

Judge precision by the effective sample size after weighting, not the raw count. Many periods or strongly imbalanced treatment histories can shrink the effective sample substantially through extreme weights. The sources here give no fixed minimum, so judge adequacy from the weight distribution and the width of the confidence interval.

Related methods

Sources

  1. 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 reference
  2. Blackwell, M., & Glynn, A. N. (2018). How to Make Causal Inferences with Time-Series Cross-Sectional Data under Selection on Observables. American Political Science Review, 112(4), 1067-1082.

    Open DOI reference