Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: st: Interrupted Time Series Analysis

From   "Ariel Linden, DrPH" <>
To   <>
Subject   re: st: Interrupted Time Series Analysis
Date   Wed, 17 Jul 2013 07:37:26 -0400

There are two past threads that I responded to related to Ward's question, and they actually complement each other:

To elaborate on my previous posts:

For an ARIMA model, you first have to ensure that you have sufficient observations in the pre and post period. The rule of thumb is 50 observations, in particular, so that you have sufficient observations to model seasonal components if they exist. If you don't have sufficient data, ARIMA models may not likely fit the data well.

Assume that you do have sufficient data, and you have performed all the appropriate procedures to identify the appropriate ARIMA model (see Linden et al 2003, and references therein, for a very basic description of the process). You can now combine the ARIMA model specification with regression covariates to estimate the "step" (intercept, or month after implementation of the intervention) and "trend" (slope, or trend in all months after intervention). 

To do the second part (ie., the step, trend), I refer you to Linden & Adams (2011), section 3: "Single group analysis". Basically, you'll need to generate some variables (T, X, and T*X) in order to fit the model: 

Y = β0 + β1T + β2X + β3TX  

Here, T is the "treatment assignment" (1/0) and X is the pre-post period value (all pre-periods = 0, and all post periods = 1). The coefficient X will give you the difference in the pre-post intercept (ie., the step), and the T*X will give you the difference in the pre-post trend. 

So now you could combine the two modeling approaches to look something like:

arima  Y T X TX, ar(1,1,0) 

I hope this helps



Linden A, Adams J, Roberts N. Evaluating disease management program effectiveness: An introduction to time series analysis. Disease Management. 2003;6(4):243-255.

Linden A, Adams JL. Applying a propensity-score based weighting model to interrupted time series data: improving causal inference in program evaluation. Journal of Evaluation in Clinical Practice. 2011;17:1231-1238.

Date: Tue, 16 Jul 2013 07:09:29 -0400
From: "Ward  Vanlaar" <>
Subject: st: Interrupted Time Series Analysis

Hi all,

A while ago a question was asked about interrupted time series analysis. The thread of emails is indexed under the title "Interrupted Time Series Analysis". Pursuant to this thread of messages, I have a follow-up question. 

I am using ARIMA time series modeling in Stata to model the intervention effect of a road safety program in a particular jurisdiction. I am using a dummy variable to distinguish between months before the program was implemented versus months when the program was in place to model the intervention and to see whether a significant change took place after the implementation of the program (for example a significant decrease in road crashes due to the safety program). Effectively, this is enables me to model a "sudden permanent" intervention, i.e., an immediate effect that remains over time. However, I also want to model a "gradual permanent model" (instead of a sudden change the change is gradual and remains over time, modeled as ù/(1-ä), where the first parameter in the numerator ù represents the intervention effect and the second parameter in the denominator ä quantifies how quickly a stable impact was realized during subsequent months) and a "sudden temporary model"  (th!
 ere !
 is an immediate effect, a spike, but the effect also immediately disappears, also modeled as ù/(1-ä), but this now represents the total displacement of the series level).

The previous thread ended by stating that an alternative for transfer functions exists in Stata using covariates with ARMAX.

I would appreciate it if someone can elaborate on either procedure (transfer and/or ARMAX approach) and explain how you go about doing this. Perhaps there is a tutorial or an example available to do this in Stata?



*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index