Simple Step Intervention Model

We consider the step intervention model,

where t=1,2,…,n indicates the observation number, yt,  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 nT observations occurring after the intervention and T observations in the pre-intervention series.  We consider a two-sided test of H0: ω=0 vs Ha: ω≠0.  In most applications it is more convenient to work with the scaled parameter δ=ω/σe, where σeis the standard deviation of the pre-intervention time series.  Our online computation gives Π(δ)=Pr{H0: rejected | δ}.

Notes on Usage:

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).

Algorithm Details and Source Code

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.



Hill, I.D. (1973).  The Normal Integral. Algorithm AS 66. Applied Statistics, 22 (3), 424-427.


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. Technometrics  47, 174-180.