Back to news

R packages for business forecasting

04 December 2017

Some of the latest forecasting algorithms developed by centre members are available as functions as free packages for the popular statistic software R.

Here we present an overview of the packages and a brief description of their functionality:

  • MAPA: This package contains functions to generate forecasts with a Multiple Aggregation Prediction Algorithm (MAPA). The algorithm uses temporal aggregation to improve upon the established exponential smoothing family of methods. As one of the latest addition, the package is now also able to handle exogenous information such as promotional information. Nikos Kourentzes provides further information about his package on his blog.
  • nnfor: This package contains functions for automatic time series modelling with neural networks. The package allows for specifying inputs with lags of the target and exogenous variables. It can also automatically deal with pre-processing such as differencing and scaling. On his blog, Nikos Kourentzes, provides several tutorials about this package.
  • smooth: The package implements exponential smoothing, ARIMA, simple moving average and several other models (including vector exponential smoothing) in state-space form. The models work with exogenous variables and on intermittent data. Ivan Svetunkov provides extensive material including examples and details about the model on his blog.
  • tsintermittent: The package supports the analysis and forecasting of intermittent demand and slow-moving items. It implements Croston, TSB, SBA and iMAPA with different estimators. Further details on the package with some examples can be found on Nikos Kourentzes’ blog.
  • thief. This package includes methods and tools for generating forecasts at different temporal frequencies using a hierarchical time series approach. In that seasonal time series are computed in all possible temporal aggregations. For example, monthly data is aggregated to 2-monthly, quarterly, 4-monthly, biannual and annual time series. In contrast to the MAPA package, thief allows the incorporation of any forecasting model such as ARIMA or ETS. You can read more about the function package here.
  • TStools: This package is a collection of various time series analysis functions. It includes an ABC and XYZ classification functions which are useful in classifying items via their profitability and ease of forecasting. See details in the blog of Nikos Kourentzes. It also includes the Nemenyi test which allows ranking different forecasting models and finding out if the difference between them is statistically significant. See the details here.

If you have any questions or suggestions regarding these R packages, do not hesitate to get in touch with us.