# How to specify when a level shift begins and ends or in the case of data series with multiple level shifts how to id when one level shift beings/ends?

I am working on forecasting airport delays the data looks like this

It looks like there is a structural break around 2004 where theres a huge increase and then a huge decrease around 2009.

I am unsure of how to detect the exact points of these structural breaks to use in ARIMA forecast. ALso if the structural break is in the middle of the series if I am to create a dummy variable for it taking value of 1 between 2004-2009 and 0 otherwise would that be correct? Or do I estimate the model first using ARIMA and then detect structural breaks. I did this with a (1,12) difference and q=(1)(12) model and its telling me to include a lot of structural breaks for many years (using the outlier statement in PROC ARIMA (SAS software))

This is what its detecting as outliers/shifts AFTER I already included like 4 level shift dummy's. How many is enough....its detecting with an alpha level of .01. Also I dont understand do I create a dummy for each of those level shifts taking a value of 0 before the date and 1 after? Im really confused on how to deal with this because I keep adding more outliers/level shifts to the model and it keeps detecting more to add I feel like I shouldn't have 10 level shifts specified in the model.

• To get that data you have to specify a lot of stuff so its a bit difficult, I emailed you the excel sheet with the data that is in your profile. Here is the link aspm.faa.gov/opsnet/sys/Delays.asp its for PHL airport monthly output and the data I use is PHL delays. – Demetri Smith Nov 24 '15 at 0:14
• One's eye and the development history of the airport both suggest that the simultaneous introduction of service by Southwest Air and fare reduction by US Air in May 2004 precipitated a large increase in delays. A newly extended runway in 2009 is officially credited with reducing congestion. In between, there were no notable changes. Such reality checks can provide a good indication of the performance of any automated statistical procedure: it had better identify these as important structural breaks. – whuber Nov 25 '15 at 20:19

I took a look at the data that you've posted. I appreciate your question because it gave me the opportunity to run it through with the software Autobox.

You are quite correct when you say that there is a structural break in 2004, but had you considered that there may be multiple candidates for a break in parameters? See the following table for a list of these candidates.

DIAGNOSTIC CHECK #4: THE CHOW PARAMETER CONSTANCY TEST The Critical value used for this test : .05 The minimum group or interval size was: 51

                F TEST TO VERIFY CONSTANCY OF PARAMETERS

CANDIDATE BREAKPOINT       F VALUE          P VALUE

52 2004/  1           3.69947          .0267988938
57 2004/  6           3.71222          .0264738875
62 2004/ 11           3.21210          .0427876196
67 2005/  4           3.58410          .0299305651
72 2005/  9           3.32751          .0382910942
77 2006/  2           2.25996          .1075565489
82 2006/  7           1.67456          .1905412741
87 2006/ 12           2.15920          .1186484852
92 2007/  5           3.08986          .0481356253
97 2007/ 10           5.95847          .0031691039
102 2008/  3           .291259          .7477028638
107 2008/  8           1.21682          .2987975860


The table above is quite illuminating, and provides a useful illustration of why iterative selection processes can sometimes do better than the human eye. Not that any of this is your fault -- you've got a difficult data set in front of you.

Am [I] to create a dummy variable for it taking value of 1 between 2004-2009 and 0 otherwise would that be correct?

You were quite correct with not only the above statement but also the following one. This is the issue in time series. The Chicken or the Egg. So your next best bet is to take it in steps--try your AR(1)[12] with encoded level shifts, and then do the process in reverse. Eventually, both should converge on an answer; but that is only if your inclination of seasonality was right. If you look at the partial autocorrelation function or autocorrelation function of the series you have put forth, neither of them suggest the need for seasonal differencing.

Autobox, after using the Chow test, determined that neither of the above was necessary. Candidate Period 97 (August 2007) was found to be the most statistically significant breakpoint. After deleting the first 96 values, things look a lot different than before.

Y(T) =1649.3

  +[X1(T)][(+  2040.7    )]            :PULSE          2008/  9   108
+[X2(T)][(+  1888.7    )]            :PULSE          2009/  6   117
+[X3(T)][(-  1144.0    )]            :PULSE          2008/  1   100
+[X4(T)][(+  1797.5    )]            :PULSE          2009/  4   115
+[X5(T)][(+  1543.3    )]            :PULSE          2009/  5   116
+     [(1-  .594B** 1)]**-1  [A(T)]


It seems that the data is sufficiently explained by an AR(1) with a few identifiable outliers.

• When a statistical procedure does not identify a blatantly obvious characteristic of a dataset, as in the failure here to find the break in 2009 (which is further supported by independent information about airport reconstruction), it is fair to call the procedure into question. I wonder whether the process of focusing on p-values is legitimate, when in fact the analysis ought to pay at least as much attention to effect size: that is, to the magnitudes of the breaks. – whuber Nov 25 '15 at 22:01
• What you say is true if you are defining a structural break as a level/step/intercept shift. In a larger context a structural break should/could be perceived as a point in time where the model parameters changed after one or more level shifts had been identified. This is precisely what happened here in this tour de force where the arima model coefficients were found to be statistically different after the level shift had been accounted for. – IrishStat Nov 25 '15 at 22:10
• @whuber - I'm guessing the procedure looked for a single break point, and consequently did something like fitting a trend up to the middle of the "high" regime and a trend down from there. I'm not familiar with Autobox, but I would hope it allows (at least) the user to specify a number of breakpoints to search for. – jbowman Nov 26 '15 at 1:37
• @jbowman I would speculate the same, but I still find the choice of breakpoints to be strange. This could be related to the reliance on comparing p-values to make the decision, which is an approach that might be difficult to justify. – whuber Nov 27 '15 at 15:07
• @Tom Reilly: There are a number of coments/questions in the coments, your answers to these would be interesting! – kjetil b halvorsen Apr 21 '20 at 14:15

@whuber, It's been 5 years and our latest version does detect a break at obs 122 in 2009.

           F TEST TO VERIFY CONSTANCY OF PARAMETERS

CANDIDATE BREAKPOINT       F VALUE          P VALUE

52 2003/  4           3.53               .031490
66 2004/  6           2.85               .060928
80 2005/  8           1.84               .162610
94 2006/ 10           1.26               .285174
108 2007/ 12           1.03               .358053
122 2009/  2           4.56               .011817     *


A change in the variance was suggested using the remaining data.

***** ITERATIVE RESULTS OF TSAY TEST *****

REGION 1 VAR REGION 2 VAR F VAL PROBABLITY

11 .21717E+06 40 .21545E+06 .9920685 .4536341
21 .21130E+06 30 .21879E+06 1.0354240 .4773001
31 .20461E+06 20 .23257E+06 1.1366749 .3672223
* 41 .20962E+06 10 .24051E+06 1.1473593 .3534678

An AR1 with an outlier and intercept are identified

Y(T) = 1398.09 delay
[X1(T)][(+ 978.07 )] :PULSE 2010/ 12 144
+ [(1- .288B** 1)]**-1 [A(T)]

• It's always nice when a statistical analysis uncovers a pattern that can be confirmed with independent data. But for this to constitute a constructive answer to the question, could you add an explanation of what you did to improve the algorithm? – whuber Apr 22 '20 at 17:38
• Sorry, I can't pinpoint that as over the previous 5 years as we had made many changes. – Tom Reilly Jan 23 at 15:06