Skip to content

Estimate the effect of a policy change like a VAT increase

Measure what a policy change did to a series, and what it will still do: here a rise in VAT that lifts inflation at once, mostly for a while and partly for good. Indicator saturation finds the break without being told the date; a transfer function then models it as a step (the persistent part) and a decaying pulse (the temporary part), and its forecasts carry the effect forward as it unwinds.

The transfer function's Graph view: inflation with its counterfactual without the 2021Q1 policy change.
The intervention model: inflation, and what it would have been without the change.

Before you start

  • A series with the change in it. This page makes one, so that the true effect is known: quarterly inflation on the dates of the example sample_macro (2000Q1 to 2024Q4), about 2% a year, with a VAT rise in 2021Q1 that adds 2 points at once, fading by 15% a quarter (temporary("2021Q1", decay=0.85)), and 0.6 points for good (step("2021Q1")), plus noise drawn with a seed. With your own data, load the series instead.
  • The date, if you know it, and what shape the effect should have: a step for a lasting change in the level, a pulse for a one-off, a decaying pulse for an effect that fades. If you are not sure there was a break, or when, let indicator saturation look first.
  • A view of the series without the change: the disturbance's ARIMA order. Here an AR(1) around a constant.

In the app, or in code

The Indicator saturation dialog: equation eq, impulse and step indicators ticked, target size 0.01, saved as sat.
Estimate → Model selection → Indicator saturation…, as in step 3.

Follow this step by step in the app

View → Guide → How do I → Estimate the effect of a policy change like a VAT increase. The Guide panel takes you through these steps one at a time: Open… opens each step's dialog filled in, Show me runs it, and each step is ticked when its result is there. In the app's help, the page's Walk me through this opens it. The Guide is in the pymetrix-guide plugin, which is experimental (pip install --pre "pymetrix[guide]"; the walkthroughs come with its release after 0.1.0a1).

  1. File → Load example data…, with Example dataset: sample_macro and Save as: data. Data → Generate series…, with Data: data, New series name: infl and Formula: 2 + 0.6*step("2021Q1") + 2*temporary("2021Q1", decay=0.85) + 0.25*normrnd(seed=1).
  2. Estimate → Equation…, with Formula: infl ~ 1 and Save as: eq: inflation around a constant, the model with no break in it.
  3. Estimate → Model selection → Indicator saturation (outliers and breaks)…, with Equation: eq, Step indicators (breaks) ticked, Target size (t-test level): 0.01 and Save as: sat. Impulse indicators (outliers) stays ticked. The Indicators tab lists the breaks and outliers found; the Graph marks the breaks on the series.
  4. Estimate → Time series → Transfer function (intervention model)…, with Series: infl, Inputs (interventions or series): step("2021Q1"), pulse("2021Q1"), Inputs whose effect decays: pulse("2021Q1"), Disturbance order (p, d, q): 1, 0, 0 and Save as: tf. The window shows the estimates (Summary), each input's impact, decay and half-life (Transfer functions), the effect path (Effects) and the series with its counterfactual (Graph).
  5. Forecast → Forecast…, with Estimated model: tf, Forecast start: 2025Q1, Forecast end: 2026Q4 and Save as: fc.
from pymetrix import Dataset, Equation, Transfer, TransferFunction, isat

data = Dataset.example("sample_macro").with_series(
    infl='2 + 0.6*step("2021Q1") + 2*temporary("2021Q1", decay=0.85) + 0.25*normrnd(seed=1)')
eq = Equation("infl ~ 1").fit(data)
sat = isat("infl ~ 1", data, iis=True, sis=True, t_pval=0.01)
sat.indicators()      # step("2021Q1") 0.92, and impulses 2021Q1 to 2022Q3 shrinking from 1.93 to 0.68
tf = TransferFunction("infl", inputs=['step("2021Q1")', Transfer('pulse("2021Q1")', den=1)], order=(1, 0, 0)).fit(data)
tf.summary()          # decay 0.874 (se 0.040), impact of the pulse 2.39, the step 0.35 (se 0.34)
tf.gains()            # the temporary effect's half-life: 5.1 quarters
effects = tf.effects(horizon=8)   # effect 2.74 in 2021Q1, 0.67 by 2024Q4: 0.35 persistent, 0.32 still unwinding
fc = tf.forecast(data, ("2025Q1", "2026Q4"))   # 2.59 in 2025Q1 down to 2.43 by 2026Q4; without the VAT rise 1.97 to 1.98
tf.plot()

Check the result

  • The break is where it was put. Indicator saturation, which was not told the date, keeps a step in 2021Q1 and a run of impulses after it that shrink from 1.93 to 0.68: a lasting shift and something on top of it that fades, the shape the transfer function then models. Before 2021 the series averages 1.98, close to the 2 it was made around.
  • The estimates are near the truth. The decay is 0.874 against 0.85, the impact of the temporary part 2.39 against 2, and the persistent part 0.35 against 0.6: its standard error, 0.34, says the data cannot tell 0.35 from 0.6 (or from 0) with only 16 quarters after the change. The sum of the two at impact, 2.74, is well measured.
  • The effect path adds up. Each period's effect is the step's 0.35 plus 2.39 × 0.874^k, k quarters after 2021Q1; the cumulative column is their running total, and the counterfactual (the series less the effect) is the inflation there would have been without the rise.
  • The forecast unwinds the effect. With no new shocks, inflation falls from 2.59 in 2025Q1 to 2.43 in 2026Q4 as the temporary part dies away: the effect column falls from 0.63 to 0.46 towards the persistent 0.35, while the counterfactual stays near 1.98.

Pitfalls

  • Permanent and temporary are hard to tell apart near the end of a sample. A slowly decaying pulse and a step look alike over a few quarters: the split is only as good as the data after the change. Report the total effect, which is well measured, with the split, and say how uncertain the persistent part is.
  • Saturation finds what is there, not what caused it. A break the search keeps at the policy date may be something else that happened then; one it keeps elsewhere (a later small step) may be the decay being approximated by steps. Use it to find dates and shapes, then model the effect with the dates you can explain.
  • The target size is a trade-off. About t_pval × the number of indicators (199 here) are kept by chance: 0.01 keeps about two, 0.05 ten. Choose it near 1/T.
  • The decay is estimated by maximum likelihood, and can sit at its limits. A decay near 1 means a pulse that hardly fades, which looks like a step: the two inputs then trade off and their standard errors are large.
  • Forecasts assume no more policy changes. The effect carries on as estimated; a reversal of the policy, or another change, is a new input.

See also