decompose_drivers
CONFOUNDER-AWARE DRIVER ANALYSIS: fits ONE multiple regression of the target on ALL candidates jointly, so each effect is estimated holding the other candidates constant. Distinguishes "it was the weather" from "a promo ran at the same time": candidates too entangled to separate (VIF > 5 or pairwise |r| > 0.8) are flagged not_separable (named pairs) instead of ranked with a confident wrong number. Returns per candidate: standardized coefficient (effect size), raw slope, p-value, VIF, pairwise r (for the pairwise-vs-joint contrast), and the best lead/lag vs the target. Use this instead of find_drivers when candidates may overlap (promo calendars, weather, seasonality) or when you need honest independent effect sizes. Omit entity for entity-less private KPI series. 2-15 candidates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| time | No | ||
| entity | No | Entity code (e.g. DEU). Omit for entity-less private series. | |
| max_lag | No | Max lead/lag periods to scan per candidate (0 disables, default 5, max 20) | |
| candidates | Yes | Candidate indicator ids to decompose jointly (2-15) | |
| target_indicator | Yes | The KPI you want to explain |