# strucchange for time seires intervention detection/analysis - ARIMA structure and covariates

For my problem, I am dealing with 4 rather short time series (between 21 and 31 points). I know that an intervention was applied to each of the time series for which I know the exact date.

However, I am not sure what effect the intervention is going to have on the dependent series (or if it is going to have any effect at all), so instead of applying intervention analysis methods that expect me to specify the data of intervention a priori, my plan is to look at the data to find "anomalies" or unusual values. In other words, I want to conduct an "Intervention Detection"

So far I have been trying to use the strucchange package for break point analysis. My questions about this package are the following:

• When analyzing the the time series, does strucchange consider possible arima structure?
• I know that other predictors have a relationship on with dependent variable: is it possible to consider the effect of these (and possible lagged effects, too?)
• can strucchange not only detect level changes/pulses, but trend changes as well?
• can I test for the significance of the detected breakpoints/interventions to avoid considering spurious level shifts?

Is there any (freely) available program that can help me with my question?

Edit: another question:

• strucchange or breakpoints allows me to specify how many values there need to be in one segment. The results very much depend on the number of segments I choose. Is there a rule of thumb what number works best (especially with few data points?)

In general, the core of the strucchange package is designed for testing, monitoring, and dating structural changes in linear regression models. (There are also some functions for more general parametric models, though.) Thus, the basic model is $$y_t = x_t^\top \beta_t + \varepsilon_t$$ where the regression coefficients can also depend on the time $$t$$. In a first step, one can test the null hypothesis that the regression coefficients are in fact constant over time $$\beta_t = \beta_0$$ using either efp() or Fstats(). If there is evidence for a structural change one can try to find breakpoints() between which the regression coefficients are piecewise constant. See: Zeileis A, Kleiber C, Krämer W, Hornik K (2003). "Testing and Dating of Structural Changes in Practice." Computational Statistics & Data Analysis, 44(1-2), 109-123. doi:10.1016/S0167-9473(03)00030-6 A preprint version is also available from my web page.

• strucchange does not offer support for ARIMA effects but AR terms can easily be included by using lagged $$y_{t-k}$$ among the regressor vector $$x_t$$. The "seatbelt" data in the paper above are an example for this.
• Other predictors can be easily included. See help("GermanM1", package = "strucchange") for an elaborate example with several regressors including lags.
• Pulses can not directly be assessed.
• Testing can and should be done, preferably before estimating breakpoints.
• The minimal segment size should be chosen as small as possible, i.e., the smallest sample size that is sufficient to reasonably estimate the regression coefficients.

Having said that, though, I guess that it will be challenging with only 21 observations to distinguish between autoregressive effects, covariate effects, and structural changes.

• When analyzing the the time series, does strucchange consider possible arima structure?

No . It ignores this without telling you that explicitly since it doesn’t allow you to pre-specify OR to identify the arima structure it is implicitly telling you NO.

•I know that other predictors have a relationship on with dependent variable: is it possible to consider the effect of these (and possible lagged effects, too?)

NO . It ignores this without telling you that explicitly since it doesn’t allow you to pre-specify OR to identify the confounder regression structure it is implicitly telling you NO.

• can strucchange not only detect level changes/pulses, but trend changes as well?

Implicitly YES since you were able to do it by setting a switch/control BUT not explicitly in the way that you want as delivered by AUTOBOX where time variables are included as causal series.

• can I test for the significance of the detected breakpoints/interventions to avoid considering spurious level shifts?

   NO that requires estimation of a model’s parameters and computation of t tests


Is there any (freely) available program that can help me with my question?

NO ( to my knowledge ! As a disclaimer I am one of the developers of AUTOBOX a time series analysis piece of software)

NOTE: Your question is primarily abour software AND that is usually off-limits here and may me deleted by a moderator