Australian government drugs subsidy scheme. Many drugs bought from pharmacies are subsidised to allow more equitable access to modern drugs. The cost to government is determined by the number and types of drugs purchased. Currently nearly 1% of GDP ($14 billion). The total cost is budgeted based on forecasts of drug usage. Automatic FoRecasting using R Forecasting the PBS 4
Australian government drugs subsidy scheme. Many drugs bought from pharmacies are subsidised to allow more equitable access to modern drugs. The cost to government is determined by the number and types of drugs purchased. Currently nearly 1% of GDP ($14 billion). The total cost is budgeted based on forecasts of drug usage. Automatic FoRecasting using R Forecasting the PBS 4
Australian government drugs subsidy scheme. Many drugs bought from pharmacies are subsidised to allow more equitable access to modern drugs. The cost to government is determined by the number and types of drugs purchased. Currently nearly 1% of GDP ($14 billion). The total cost is budgeted based on forecasts of drug usage. Automatic FoRecasting using R Forecasting the PBS 4
Australian government drugs subsidy scheme. Many drugs bought from pharmacies are subsidised to allow more equitable access to modern drugs. The cost to government is determined by the number and types of drugs purchased. Currently nearly 1% of GDP ($14 billion). The total cost is budgeted based on forecasts of drug usage. Automatic FoRecasting using R Forecasting the PBS 4
$800 million. Thousands of products. Seasonal demand. Subject to covert marketing, volatile products, uncontrollable expenditure. Although monthly data available for 10 years, data are aggregated to annual values, and only the first three years are used in estimating the forecasts. All forecasts being done with the FORECAST function in MS-Excel! Automatic FoRecasting using R Forecasting the PBS 5
$800 million. Thousands of products. Seasonal demand. Subject to covert marketing, volatile products, uncontrollable expenditure. Although monthly data available for 10 years, data are aggregated to annual values, and only the first three years are used in estimating the forecasts. All forecasts being done with the FORECAST function in MS-Excel! Automatic FoRecasting using R Forecasting the PBS 5
$800 million. Thousands of products. Seasonal demand. Subject to covert marketing, volatile products, uncontrollable expenditure. Although monthly data available for 10 years, data are aggregated to annual values, and only the first three years are used in estimating the forecasts. All forecasts being done with the FORECAST function in MS-Excel! Automatic FoRecasting using R Forecasting the PBS 5
$800 million. Thousands of products. Seasonal demand. Subject to covert marketing, volatile products, uncontrollable expenditure. Although monthly data available for 10 years, data are aggregated to annual values, and only the first three years are used in estimating the forecasts. All forecasts being done with the FORECAST function in MS-Excel! Automatic FoRecasting using R Forecasting the PBS 5
$800 million. Thousands of products. Seasonal demand. Subject to covert marketing, volatile products, uncontrollable expenditure. Although monthly data available for 10 years, data are aggregated to annual values, and only the first three years are used in estimating the forecasts. All forecasts being done with the FORECAST function in MS-Excel! Automatic FoRecasting using R Forecasting the PBS 5
(None) (Additive) (Multiplicative) N (None) N,N N,A N,M A (Additive) A,N A,A A,M Ad (Additive damped) Ad,N Ad,A Ad,M There are 9 separate exponential smoothing methods. Automatic FoRecasting using R Exponential smoothing 8
(None) (Additive) (Multiplicative) N (None) N,N N,A N,M A (Additive) A,N A,A A,M Ad (Additive damped) Ad,N Ad,A Ad,M There are 9 separate exponential smoothing methods. Each can have an additive or multiplicative error, giving 18 separate models. Automatic FoRecasting using R Exponential smoothing 8
(None) (Additive) (Multiplicative) N (None) N,N N,A N,M A (Additive) A,N A,A A,M Ad (Additive damped) Ad,N Ad,A Ad,M There are 9 separate exponential smoothing methods. Each can have an additive or multiplicative error, giving 18 separate models. Only 15 models are numerically stable. Automatic FoRecasting using R Exponential smoothing 8
2(k + 1)(k + 2) T − k where L is the likelihood, k is the number of estimated parameters in the model and T is the number of observations in the series. Minimizing the Gaussian AIC is asymptotically equivalent (as T → ∞) to minimizing MSE from one-step forecasts on test set via time series cross-validation. Automatic FoRecasting using R Exponential smoothing 10
2(k + 1)(k + 2) T − k where L is the likelihood, k is the number of estimated parameters in the model and T is the number of observations in the series. Minimizing the Gaussian AIC is asymptotically equivalent (as T → ∞) to minimizing MSE from one-step forecasts on test set via time series cross-validation. Automatic FoRecasting using R Exponential smoothing 10
11 Based on Hyndman, Koehler, Snyder & Grose (IJF 2002): Apply each of 15 models that are appropriate to the data. Optimize parameters and initial values using MLE. Select best method using AICc. Produce forecasts using best method. Obtain prediction intervals using underlying state space model.
11 Based on Hyndman, Koehler, Snyder & Grose (IJF 2002): Apply each of 15 models that are appropriate to the data. Optimize parameters and initial values using MLE. Select best method using AICc. Produce forecasts using best method. Obtain prediction intervals using underlying state space model.
11 Based on Hyndman, Koehler, Snyder & Grose (IJF 2002): Apply each of 15 models that are appropriate to the data. Optimize parameters and initial values using MLE. Select best method using AICc. Produce forecasts using best method. Obtain prediction intervals using underlying state space model.
11 Based on Hyndman, Koehler, Snyder & Grose (IJF 2002): Apply each of 15 models that are appropriate to the data. Optimize parameters and initial values using MLE. Select best method using AICc. Produce forecasts using best method. Obtain prediction intervals using underlying state space model.
400 500 600 1960 1980 2000 Year Number of sheep (millions) level 80 95 Forecasts from ETS(M,A,N) fit <- ets(livestock) fcast <- forecast(fit) plot(fcast)
2008): Select no. differences via unit root tests. Use stepwise search to traverse model space, starting with a simple model and considering nearby variants. For each model, optimize parameters using MLE. Select best method using AICc. Produce forecasts and prediction intervals using best method. Automatic FoRecasting using R ARIMA models 17
2008): Select no. differences via unit root tests. Use stepwise search to traverse model space, starting with a simple model and considering nearby variants. For each model, optimize parameters using MLE. Select best method using AICc. Produce forecasts and prediction intervals using best method. Automatic FoRecasting using R ARIMA models 17
2008): Select no. differences via unit root tests. Use stepwise search to traverse model space, starting with a simple model and considering nearby variants. For each model, optimize parameters using MLE. Select best method using AICc. Produce forecasts and prediction intervals using best method. Automatic FoRecasting using R ARIMA models 17
2008): Select no. differences via unit root tests. Use stepwise search to traverse model space, starting with a simple model and considering nearby variants. For each model, optimize parameters using MLE. Select best method using AICc. Produce forecasts and prediction intervals using best method. Automatic FoRecasting using R ARIMA models 17
2008): Select no. differences via unit root tests. Use stepwise search to traverse model space, starting with a simple model and considering nearby variants. For each model, optimize parameters using MLE. Select best method using AICc. Produce forecasts and prediction intervals using best method. Automatic FoRecasting using R ARIMA models 17
400 500 1960 1980 2000 Year Number of sheep (millions) level 80 95 Forecasts from ARIMA(0,1,0) with drift fit <- auto.arima(livestock) fcast <- forecast(fit) plot(fcast)
0.6 0.9 1.2 1995 2000 2005 2010 Year millions of scripts level 80 95 Forecasts from ARIMA(3,1,3)(0,1,1)[12] fit <- auto.arima(h02) fcast <- forecast(fit) plot(fcast)
heterogeneity ARMA errors for short-term dynamics Trend (possibly damped) Seasonal (including multiple and non-integer periods) Automatic algorithm described in De Livera, Hyndman and Snyder (JASA 2011). Automatic FoRecasting using R TBATS models 23
of several time series that are linked together in a hierarchical structure. Total A AA AB AC B BA BB BC C CA CB CC Examples Manufacturing product hierarchies Sales by state and region Automatic FoRecasting using R Hierarchical time series 27
of several time series that are linked together in a hierarchical structure. Total A AA AB AC B BA BB BC C CA CB CC Examples Manufacturing product hierarchies Sales by state and region Automatic FoRecasting using R Hierarchical time series 27
of several time series that are linked together in a hierarchical structure. Total A AA AB AC B BA BB BC C CA CB CC Examples Manufacturing product hierarchies Sales by state and region Automatic FoRecasting using R Hierarchical time series 27
1 Forecast all series at all levels of aggregation. 2 Reconcile the forecasts by making the smallest possible changes such that they add up. 3 Extremely fast algorithm implemented in the hts package for R. Automatic FoRecasting using R Hierarchical time series 28
1 Forecast all series at all levels of aggregation. 2 Reconcile the forecasts by making the smallest possible changes such that they add up. 3 Extremely fast algorithm implemented in the hts package for R. Automatic FoRecasting using R Hierarchical time series 28
1 Forecast all series at all levels of aggregation. 2 Reconcile the forecasts by making the smallest possible changes such that they add up. 3 Extremely fast algorithm implemented in the hts package for R. Automatic FoRecasting using R Hierarchical time series 28
1 Forecast all series at all levels of aggregation. 2 Reconcile the forecasts by making the smallest possible changes such that they add up. 3 Extremely fast algorithm implemented in the hts package for R. Automatic FoRecasting using R Hierarchical time series 28
1 Forecast all series at all levels of aggregation. 2 Reconcile the forecasts by making the smallest possible changes such that they add up. 3 Extremely fast algorithm implemented in the hts package for R. Automatic FoRecasting using R Hierarchical time series 28
1 Forecast all series at all levels of aggregation. 2 Reconcile the forecasts by making the smallest possible changes such that they add up. 3 Extremely fast algorithm implemented in the hts package for R. Automatic FoRecasting using R Hierarchical time series 28
1 Forecast all series at all levels of aggregation. 2 Reconcile the forecasts by making the smallest possible changes such that they add up. 3 Extremely fast algorithm implemented in the hts package for R. Automatic FoRecasting using R Hierarchical time series 28
first 12 observations and generate 1- to 8-step-ahead forecasts; Increase sample size one observation at a time, re-estimate models, generate forecasts until the end of the sample; In total 24 1-step-ahead, 23 2-steps-ahead, up to 17 8-steps-ahead for forecast evaluation. Automatic FoRecasting using R Hierarchical time series 32
first 12 observations and generate 1- to 8-step-ahead forecasts; Increase sample size one observation at a time, re-estimate models, generate forecasts until the end of the sample; In total 24 1-step-ahead, 23 2-steps-ahead, up to 17 8-steps-ahead for forecast evaluation. Automatic FoRecasting using R Hierarchical time series 32
first 12 observations and generate 1- to 8-step-ahead forecasts; Increase sample size one observation at a time, re-estimate models, generate forecasts until the end of the sample; In total 24 1-step-ahead, 23 2-steps-ahead, up to 17 8-steps-ahead for forecast evaluation. Automatic FoRecasting using R Hierarchical time series 32
first 12 observations and generate 1- to 8-step-ahead forecasts; Increase sample size one observation at a time, re-estimate models, generate forecasts until the end of the sample; In total 24 1-step-ahead, 23 2-steps-ahead, up to 17 8-steps-ahead for forecast evaluation. Automatic FoRecasting using R Hierarchical time series 32
consulting projects July/August 2003 ets and thetaf added August 2006 v1.0 available on CRAN May 2007 auto.arima added July 2008 JSS paper (Hyndman & Khandakar) September 2009 v2.0. Unbundled. May 2010 arfima added Feb/March 2011 tslm, stlf, naive, snaive added August 2011 v3.0. Box Cox transformations added December 2011 tbats added April 2012 Package moved to github November 2012 v4.0. nnetar added June 2013 Major speed-up of ets January 2014 v5.0. tsoutliers and tsclean added May 2015 v6.0. Added several new plots December 2015 264,000 package downloads in one month! February 2016 v7.0. Added ggplot2 graphics & bias adjustment Automatic FoRecasting using R Hierarchical time series 34
all papers and books. Links to R packages. A blog about forecasting research. OTexts.org/fpp Free online book based on forecast package for R. Automatic FoRecasting using R Hierarchical time series 35