Time-series analysis — Part 2

4 min readJan 20, 2022
Photo by Aron Visuals on Unsplash

In the part 1 of this article series, I went over some basic methods of forecasting utilizing time-series data. In this article, we will be going over some of the more mathematically advanced methods of time-series forecasting.

  1. Holt’s linear trend method

This method, developed in 1957, is an extension of exponential smoothing, used in forecasting by including two smoothing equations.

Equation used to forecast

In these equations, t denotes the time, l(t) denotes the level of time-series at time t, b(t) represents the trend values at time t, h represents the time for which we are forecasting.

2. Holt-Winter’s seasonal method

This method is an extension of Holt’s method, to include a parameter for seasonality.

Holt-Winter’s equation (ADDITIVE)

Here, S(t) represents seasonal value at time t.

Another form of Holt-Winter’s method is the multiplicative form, where we assume the prediction function to be a product of smoothing function, trend function and seasonality function.

Holt-Winter’s equation (Multiplicative)

3. Holt’s damped method

This method is an improvement to the Holt’s method. In Holt’s, the trend seem to continue to rise or fall infinitely. But, it has been observed that this leads to over-forecasting and hence, the methods needs some improvements. Gardner & McKenzie included a damping parameter in the model to make it more realistic.

Holt’s equation with damping parameter

Forecasting in R

Reading the data set and converting to a time-series. We have a weekly time-series consisting of average weekly temperature.

data_week <- read.csv('data_week.csv')
week <- ts(data_week, start=c(2015), frequency=52.25)
xx = ts(temp, frequency = 52, start = c(2015,1))

Fitting the data-set to the various methods mentioned above:

fc2 <- holt(xx, h=100)
fc <- holt(xx, damped=TRUE, phi = 0.8, h=100)
fit1 <- HoltWinters(xx, beta = TRUE, gamma = TRUE, seasonal="additive")
fit2 <- HoltWinters(xx, beta = TRUE, gamma = TRUE, seasonal="multiplicative")

Plotting the time-series:

Various Holt’s method forecast

From the above chart, it is clear that we need some improvement in the forecasting. I tried by removing the gamma and beta parameter (seasonal and trend coefficients) in an iterative manner and we can see drastic improvements in the forecast.

Holt’s method (gamma removed)
Holt’s method (beta removed)
Modified Holt-Winter’s Forecast

As we can see from the above charts, we will need to modify our methods based on data set.

We have one more important class of methods, called Auto-Regressive Integrated Moving Average (ARIMA). We will discuss this in more detail in part 3 of the article series.