interactive_fixed_effects#

Bayesian interactive fixed-effects synthetic control.

The untreated path is Xu’s linear factor mean: an additive unit intercept, an additive time intercept, and a loading-factor product. Rank is not selected. A multiplicative gamma process shrinks unused factor scales toward zero, and posterior intervals marginalize that prior.

Shared factors and shared time intercepts are updated from the control panel only. The control likelihood uses the one shared positive residual scale, not a unit observation scale. That is one random variable. Treated pre-period outcomes may update that scale’s draws after the factor and time-intercept sample, and must not resample those draws. Loadings use the updated draws. The factor posterior is the control-panel posterior under that scale as informed by the control panel. It is not recomputed under the treated-pre update. Treated post-intervention outcomes never enter the likelihood.

Functions

pre_period_score(predictions_pre, treated_pre)

Bayesian \(R^2\) of pre-period predictions against pre-period outcomes.

untreated_counterfactual(unit_intercept, ...)

Return unit intercept + time intercept + loading-factor product.

Classes

InteractiveFixedEffectsResult

Result bundle for interactive fixed-effects synthetic control.

InteractiveFixedEffectsSyntheticControl

Interactive fixed-effects synthetic control on a WidePanel.