# Forecast time series with breakpoint using Holt-Winters (R)

I have a time series dataset for forecast using Holt-winters model, but my problem is the time series contains breaks or change point, Should we remove the first break? Or is there any other solution for managing breaks in the Holt-Winters model? Knowing that by removing the first breaks data the error rate of my model decrease.

• Is there any clarity as to what happened to cause that change? That may be useful to model
– Jon
Feb 16, 2017 at 23:36
• @Jon I think it implied growth of revenues Feb 17, 2017 at 11:01

I would construct the following model:

$Y_t = \mu + \alpha t + \beta_t + \sigma$, where

• $Y_t$ is the response at time t
• $\mu$ is the mean level overall
• $t$ is time and $\alpha$ is the slope
• $\beta_t$ is an adjustment for before or after the break. E.g. if $t<22$, then subtract a constant, else add a different constant
• $\sigma$ is the constant variance

Some pseudo-code in R might be

library(nlme)
model <- gls(response ~ time + adjust)


Where adjust is an indicator variable of being before or after the breakpoint.

Eyeballing your data, the model might be:

$Y_t = 0.75+0t-0.50$ if $t<22$

$Y_t = 0.75+0t+0.25$ if $t \ge 22$

Where $Y_t$ is in millions.

• Thank you for the information provide @StatMan, I will test this solution. Feb 15, 2017 at 17:07

One of the typical assumptions when doing changepoint detection is that the segments are independent. Thus if this is the case, the data prior to the break is uninformative for the data after the break. Thus you are safe to only use the data post-break for training a forecasting model.

The problem with the @StatMan recommendation is that it is ad hoc . If you have possible complications/opportunities such as an error process that is ARMA or there are local time trends or there are are pulses or there are time varying parameters , or time varying error variance or multiple level shifts .... them one needs to form a much more complicated structure.