Power for an interrupted time series
Estimate the chance of detecting a count level change at fixed time points; Mallard simulates that design and returns power without a headline sample size.
Why this level?
not one of the five research areas this hierarchy covers. NHMRC 2009 sourceThis is a planning calculation, not an additional study design or a rating of causal evidence. The interrupted time series design and its comparison structure determine what the study can support.
Fit
When to use it, and when not to
Use it when
- You have counts at regular time points before and after a known intervention date.
- You need power for the level change in one series or relative to one untreated comparison series.
Not when
- You want power for a continuous outcome, changing exposure or serially correlated counts. Use a study-specific simulation. Read: Simulation-based power and sample-size planning
- Your primary test concerns slope change alone. Specify and simulate that test; Mallard tests the level coefficient. Read: Segmented regression for interrupted time series
Before you start
What you need
- Time points before and after the changeSupply at least three on each side, at equal intervals. This minimum is an input rule, not evidence of adequate power.
- Expected counts in each seriesoutcomeTypeGive baseline events per point for the intervention and, if used, comparison series. Exposure must stay constant.
- Level and slope rate ratiosThe level ratio sets the tested effect. The slope ratio changes the generated trend but is not the tested coefficient.
- Extra count variation, seasonality and a shared stepSupply negative binomial size or use Poisson counts. Optional seasonal terms use a twelve-point cycle; a shared step must precede intervention.
- Two-sided alpha and random seedAlpha sets the false-positive cutoff. The plan engine uses one thousand simulation attempts and a fixed default seed.
- Every planned time point is observed.How to check: Missing time points are not simulated. Specify a separate missing-data scenario if routine counts may be absent.
- The generated count model is plausible.How to check: The generator starts with a flat baseline, apart from optional seasonality and a shared step. Check these assumptions against earlier data.
- Overdispersion does not stand in for serial autocorrelation.How to check: Nearby time points may share errors. Mallard does not simulate that dependence; treat its power as optimistic when such dependence matters.
- The fitted level-change test matches the planned question.How to check: Mallard fits quasi-Poisson segmented regression and uses a two-sided Wald t test. It includes separate level and slope terms.
Plain language
How it works
Mallard generates Poisson counts, or negative binomial counts when extra variation is specified. A control series has its own baseline. Optional terms add a shared earlier step and a twelve-point seasonal cycle.
Each attempt fits quasi-Poisson segmented regression with time, level and slope terms. A controlled fit adds series-specific time terms and intervention interactions. The two-sided Wald t test concerns the level coefficient, with residual degrees of freedom. Power is the rejection share among fitted attempts. The plan engine uses one thousand attempts and caches identical inputs.
No underlying baseline trend is generated beyond the optional step and season. Counts are drawn independently at fixed exposure. Large Poisson means use a normal approximation. More attempts reduce simulation noise, not these modeling limits.
Worked example
A worked example
- Setting
- A service plans 24 monthly points before and 24 after a policy, plus an untreated comparison series.
- Question
- Can it detect a level rate ratio of 0.7, meaning a 30 percent reduction?
- Approach
- Assume 5 events per month in each series, Poisson counts, slope ratio 1 and alpha 0.05. Use no season or shared step. Seed: 20260915.
- Result
- 261 of 1,000 fitted attempts reject, or 26.1 in 100 (26.1 percent power). There are 0 failed fits. Monte Carlo standard error is 1.39 percentage points.
- What it means
- This is power for the assumed level change, conditional on fitted attempts. It is not a patient target or evidence that autocorrelation is harmless.
In practice
Recent studies PubMed search · not vetted
Watch out
Common mistakes
The one to remember
Mallard simulates count level-change power, not slope-change power. Serial autocorrelation and changing exposure are not modeled; no headline sample size is returned.
- Reading the slope input as power for a slope test.Instead: The engine tests the level coefficient. A slope-only question needs its own simulation.
- Hiding failed fits or simulation noise.Instead: Report attempts, failures, fitted attempts and Monte Carlo standard error. Mallard divides rejections by fitted attempts.
- Treating extra count variation as serial dependence.Instead: Negative binomial counts allow extra variation, but the generator still draws independent counts at each point.
Inside Mallard
How Mallard uses this
Mallard runs seeded count simulations at the supplied time points. It returns power and Monte Carlo error, without a headline sample size.
design.power_interrupted_time_series, the id a plan cue records.Related Learn pages
Related designs and methods
Evidence
Sources & further reading
- Interrupted time series regression for the evaluation of public health interventions: a tutorial (opens in a new tab) · Int J Epidemiol · doi 10.1093/ije/dyw098
- Using simulation studies to evaluate statistical methods (opens in a new tab) · Stat Med · doi 10.1002/sim.8086