O'Reilly logo

Data Analysis with R - Second Edition by Tony Fischetti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Simple exponential smoothing for forecasting

As it turns out, simple exponential smoothing can be used to forecast into the future, as well! This method is the simplest of all exponential smoothing forecast methods, and is really only to be used for trend-less series (such as the Gaussian noise series).

In this section, we will be making a forecast with this method, and see a few other very simple forecasting methods for comparison. Let's start with these simple forecasting methods.

The mean method simply forecasts future values using the mean of the historical data. Let's see it in action:

> mfore <- meanf(gausts, h=20)> autoplot(mfore)

The meanf function (which performs the forecast and returns an object of the same name) takes a h argument, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required