We consider the step intervention model,

where t=1,2,…,n indicates the observation number,
y_{t}, is the observed time series,

and e(t) is autocorrelated error, assumed to be generated by an AR(1),

where
a(t)~NID(0,σ^{2}). The parameter a represents the intercept term, ω the impact of the intervention and φ is the lag-one autocorrelation in the pre-intervention series. There are n–T observations
occurring after the intervention and T observations in the pre-intervention series. We consider a two-sided test of
H_{0}: ω=0 vs
H_{a}: ω≠0. In most applications it is more convenient to work with the scaled parameter δ=ω/σ_{e}, where
σ_{e}is the standard deviation of the pre-intervention time series. Our online computation gives Π(δ)=Pr{H_{0}: rejected | δ}.

When you run the online calculator, you are prompted for n, T and phi. You can try different values of these parameters by re-running the script. To re-run the script simply refresh or reload the page (use F5 with IE and Ctrl-R with Firefox).

__Internet Explorer Users__

The online power calculator is written in Javascript. Often this is disabled if you are using Microsoft Internet Explorer (IE) but you can easily enable it. Another possibility is to do a complete save for this webpage and then run it locally (also see below about downloading for another method). With IE7 there are built-in security that prevent Javascripts prompting for information -- to bypass this set the security to medium. To do this, start IE, click on Tools ... Internet Options ... Security ... drag security level to bottom level (medium).

The general technique is given in McLeod and Vingilis (2005). The algorithm for the step intervention model with AR(1) error is presented in McLeod and Vingilis (2007). The online calculator is implemented in Javascript. The normal cumulative distribution is computed using the Fortran algorithm given by Hill (1973) which was translated into Javascript.

__Download and Install Locally__

Simply do a complete save of this page and then load this page in your browser from your computer. Alternatively you can save the Javascript and its associated HTML file and then just load this HTML file to run the program. The Javascript file and associated HTML files are: TwoSided.js and TwoSided.html.

__References__

Hill, I.D. (1973). The Normal Integral.
Algorithm AS 66. | |

McLeod, A.I. and Vingilis, E.R. (2007). Power Computations in Time Series Analysis for Traffic Safety Interventions. Working Paper. | |

McLeod, A.I. and Vingilis, E.R. (2005). Power
Computations for Intervention Analysis. |