Fixed-effects Estimator
The released fe preset fits a one-unit fixed-effects marketing-mix model.
It absorbs a separate intercept for each unit and identifies shared media and
control effects from temporal changes within each unit.
For units i and dates t, the level formulation is:
y_it = alpha_i + f(media_it; theta) + controls_it * gamma + error_it.
AMMM3 fits the equivalent exact within-unit orthonormal-contrast likelihood.
The unit intercepts alpha_i are not regularised parameters in the graph.
Consequently, persistent differences between units do not identify the shared
media coefficients.
Released contract
estimator:
type: fe
unit: geo
The released surface has these deliberate limits:
| Component | Released FE behaviour |
|---|---|
| Unit dimensions | Exactly one categorical unit column |
| Unit effects | Absorbed fixed intercepts |
| Media and control slopes | Shared across units |
| Adstock and saturation parameters | Shared across units |
| Residual scale | Shared across units |
| Common time effects | Not supported |
| Annual seasonality and custom additive effects | Not supported |
| Time-varying intercepts or media | Not supported |
| Budget optimisation and calibration | Not supported |
Use the bundled starting point at
data/demo/geo_fe/config.yml. It contains only settings supported by this
contract.
Run it from the repository root:
python3 runme.py --demo geo_fe
Data requirements
The dataset must be balanced on the declared unit and date columns: every unit must have the same dates, and each unit-date pair must occur once. It must have at least two units and two dates.
Each channel and control must vary within at least one fitted unit. A predictor that is constant within every unit cannot be estimated by FE and causes a pre-fit error. The target must also have non-zero within-unit variation.
This is not the same as adding geo controls to a pooled model. FE discards
between-geo level variation from the likelihood for the shared slope
coefficients.
Estimability screen
Before the main graph is created, AMMM3 evaluates media after the configured adstock and saturation transforms at a fixed-seed PyMC initial point. It saves:
10_pre_diagnostics/fixed_effects_estimability.csv10_pre_diagnostics/fixed_effects_estimability.json
The report records the reference basis, within-variation share, VIF, condition number, rank, and the thresholds used. Its default policy is:
| Check | Default | Action |
|---|---|---|
| Zero transformed within-unit variation | exact numerical check | Error |
| Rank-deficient transformed within design | exact matrix-rank check | Error |
| Within-variation share | below 0.05 | Warning |
| VIF | above 20 | Warning |
| Condition number | at least 30 | Warning |
You may version a stricter or looser warning policy in the estimator block:
estimator:
type: fe
unit: geo
estimability:
within_variation_share_warning: 0.10
max_vif_warning: 10
condition_number_warning: 20
The zero-variation and rank checks remain errors. Do not suppress a warning by changing a threshold without recording why the underlying design remains fit for purpose.
The screen is a reference-design diagnostic. It cannot prove identification for every posterior draw because adstock and saturation parameters are estimated. A pass is necessary for the released graph, not sufficient evidence for a causal or decision claim.
Interpretation
For a media channel to be identified, it needs meaningful within-unit temporal variation after the configured transforms. National media that is identical in every geography can still vary over time, but it can be difficult to separate from common shocks. The initial FE contract does not add time fixed effects, so it does not claim to solve that problem.
FE removes time-invariant unit characteristics. It does not solve time-varying endogeneity, anticipation, simultaneous promotions, or measurement error. Use the preflight report, posterior diagnostics, predictive checks, prior sensitivity, and an explicit causal design before making attribution or budget decisions.
What comes next
RE and CRE are separate estimator contracts. CRE is released under its own transformed-summary and prediction boundary; RE remains unavailable.
For a direct comparison, see Choose an Estimator.