Title

power_arima_itsa -- Power analysis for an interrupted time series intervention evaluated using ARIMA with AR(1) Errors

Syntax

power_arima_itsa,
ntime(#)
effect(numlist)
[ trperiod(#)
type(string)
acorr(#)
alpha(#)
onesided
knownmean
raw
format(%fmt) ]

* ntime(#) specify the number of time periods in the series

* effect(numlist) effect size

trperiod(#) the time period when the intervention begins; default is halfway in the time series ntime()

type(string) type of intervention effect: "step", "pulse", or "ramp"; default is type(step)

acorr(#) specify the correlation coefficient between adjacent (autoregressive) error terms; default is acorr(0)

alpha(#) significance level; default is alpha(0.05)

onesided one-sided test; default is two-sided

knownmean the pre-intervention mean is known; default is that the pre-intervention mean is estimated

raw effects() are unstandardized values; default is that effects() are standardized

format(%fmt) display numeric format for values in the output; default is format(%-6.3f)

* ntime() and effect() are required.

Description

power_arima_itsa computes power for a single-group interrupted time series analysis (ITSA) that will ultimately be evaluated using
an Autoregressive Integrated Moving Average (ARIMA) model (McLeod and Vingilis 2005). Power is determined for an intervention that is
expected have a "step" (level), "pulse" (single-period), or "ramp" (trend) effect. The results can be computed for actual effects, or
as standardized effects (the intervention effect in units corresponding to standard deviations of the pre-intervention series).

Remark

It is important to note that when evaluating a single-group ITSA using ARIMA, the effects ("step", "pulse" and "ramp") represent the
predicted treatment period observations versus the counterfactual (the time series trajectory assuming no intervention). For the "step" effect,
this is similar to how ITSA using time series regression would evaluate a level change. However, the "trend" effect in ITSA analyses using time
series regression differs from the "ramp" effect in ARIMA in that it represents the difference between the pre-intervention and post-intervention
trends. Therefore, a researcher may use power_arima_itsa for computing power for a "step" effect if they ultimately will use time series regression
for evaluating a "level" change, but should not use power_arima_itsa for computing power for a "ramp" effect if they ultimately will use time
series regression for evaluating a difference in pre- to post-intervention "trends".

Options

ntime(integer) specifies the number of time periods to generate in the series; ntime() is required.

effect(numlist) specifies the effect size; effect() is required.

trperiod(integer) specifies the time period when the intervention begins; the default is the halfway point in the time series.

type(string) specifies the effect type as "step", "pulse", or "ramp"; the default is type(step).

acorr(#) specifies the correlation coefficient between adjacent (autoregressive) error terms; the default is acorr(0).

alpha(#) sets the significance level of the test. The default is alpha(0.05).

onesided one-sided test; default is two-sided.

knownmean the pre-intervention mean is known; default is that the pre-intervention mean is estimated.

raw indicates that the effect(s) specified in effect() are actual values; default is that values specified in effect()
are standardized (the intervention effect in units corresponding to standard deviations of the pre-intervention series).

format(%fmt) specifies the numeric format for displaying power in the output. The default is format(%-6.3f).

Examples

This example is taken from Table 5 in McLeod and Vingilis (2005), where there is an expected "step" effect (level), there are 60 periods,
the intervention is introduced at time 36, the effects are standardized, the autcorrelation coefficient is 0.50, and the test is one-sided.

. power_arima_itsa , n(60) effect(0(0.25)2) tr(36) ac(0.5) onesided

Same as above but assume the intervention will have a "pulse" effect.

. power_arima_itsa , n(60) effect(0(0.25)2) tr(36) ac(0.5) onesided type(pulse)

In this example, we assume that the intervention will produce a "ramp" effect (trend), there will be 10 total periods and the intervention
will commence at period 5. We test raw (unstandardized) effects ranging from 0 to 0.90 and assume the autocorrelation is 0.5.

. power_arima_itsa , n(10) effect(0(0.05)0.9) tr(5) ac(0.5) type(ramp) raw

Same as above but specify a one-sided test and specify that the pre-intervention mean in known.

. power_arima_itsa , n(10) effect(0(0.05)0.9) tr(5) ac(0.5) type(ramp) raw onesided knownmean

Stored results

power_arima_itsa stores the following in r():

Matrices

r(table) table of results

References

McLeod, A. I. and E. R. Vingilis. 2005.
Power Computations for Intervention Analysis.
Technometrics 47: 174-181.

Citation of power_arima_itsa

power_arima_itsa is not an official Stata command. It is a free contribution
to the research community, like a paper. Please cite it as such:

Linden A. (2025). POWER_ARIMA_ITSA: Stata module to compute power for an interrupted time series intervention evaluated using ARIMA with AR(1) Errors.

Author

Ariel Linden

Linden Consulting Group, LLC

alinden@lindenconsulting.org

Help: arima, power_step (if installed)