• Forecasting: Principles and Practice
  • Preface
  • 1 Getting started
    • 1.1 What can be forecast?
    • 1.2 Forecasting, goals and planning
    • 1.3 Determining what to forecast
    • 1.4 Forecasting data and methods
    • 1.5 Some case studies
    • 1.6 The basic steps in a forecasting task
    • 1.7 The statistical forecasting perspective
    • 1.8 Exercises
    • 1.9 Further reading
  • 2 Time series graphics
    • 2.1 tsibble objects
    • 2.2 Time plots
    • 2.3 Time series patterns
    • 2.4 Seasonal plots
    • 2.5 Seasonal subseries plots
    • 2.6 Scatterplots
    • 2.7 Lag plots
    • 2.8 Autocorrelation
    • 2.9 White noise
    • 2.10 Exercises
    • 2.11 Further reading
  • 3 Time series decomposition
    • 3.1 Transformations and adjustments
    • 3.2 Time series components
    • 3.3 Moving averages
    • 3.4 Classical decomposition
    • 3.5 Methods used by official statistics agencies
    • 3.6 STL decomposition
    • 3.7 Exercises
    • 3.8 Further reading
  • 4 Time series features
    • 4.1 Some simple statistics
    • 4.2 ACF features
    • 4.3 STL Features
    • 4.4 Other features
    • 4.5 Exploring Australian tourism data
    • 4.6 Exercises
    • 4.7 Further reading
  • 5 The forecaster’s toolbox
    • 5.1 A tidy forecasting workflow
    • 5.2 Some simple forecasting methods
    • 5.3 Fitted values and residuals
    • 5.4 Residual diagnostics
    • 5.5 Distributional forecasts and prediction intervals
    • 5.6 Forecasting using transformations
    • 5.7 Forecasting with decomposition
    • 5.8 Evaluating point forecast accuracy
    • 5.9 Evaluating distributional forecast accuracy
    • 5.10 Time series cross-validation
    • 5.11 Exercises
    • 5.12 Further reading
  • 6 Judgmental forecasts
    • 6.1 Beware of limitations
    • 6.2 Key principles
    • 6.3 The Delphi method
    • 6.4 Forecasting by analogy
    • 6.5 Scenario forecasting
    • 6.6 New product forecasting
    • 6.7 Judgmental adjustments
    • 6.8 Further reading
  • 7 Time series regression models
    • 7.1 The linear model
    • 7.2 Least squares estimation
    • 7.3 Evaluating the regression model
    • 7.4 Some useful predictors
    • 7.5 Selecting predictors
    • 7.6 Forecasting with regression
    • 7.7 Nonlinear regression
    • 7.8 Correlation, causation and forecasting
    • 7.9 Matrix formulation
    • 7.10 Exercises
    • 7.11 Further reading
  • 8 Exponential smoothing
    • 8.1 Simple exponential smoothing
    • 8.2 Methods with trend
    • 8.3 Methods with seasonality
    • 8.4 A taxonomy of exponential smoothing methods
    • 8.5 Innovations state space models for exponential smoothing
    • 8.6 Estimation and model selection
    • 8.7 Forecasting with ETS models
    • 8.8 Exercises
    • 8.9 Further reading
  • 9 ARIMA models
    • 9.1 Stationarity and differencing
    • 9.2 Backshift notation
    • 9.3 Autoregressive models
    • 9.4 Moving average models
    • 9.5 Non-seasonal ARIMA models
    • 9.6 Estimation and order selection
    • 9.7 ARIMA modelling in fable
    • 9.8 Forecasting
    • 9.9 Seasonal ARIMA models
    • 9.10 ARIMA vs ETS
    • 9.11 Exercises
    • 9.12 Further reading
  • 10 Dynamic regression models
    • 10.1 Estimation
    • 10.2 Regression with ARIMA errors using fable
    • 10.3 Forecasting
    • 10.4 Stochastic and deterministic trends
    • 10.5 Dynamic harmonic regression
    • 10.6 Lagged predictors
    • 10.7 Exercises
    • 10.8 Further reading
  • 11 Forecasting hierarchical and grouped time series
    • 11.1 Hierarchical and grouped time series
    • 11.2 Single level approaches
    • 11.3 Forecast reconciliation
    • 11.4 Forecasting Australian domestic tourism
    • 11.5 Reconciled distributional forecasts
    • 11.6 Forecasting Australian prison population
    • 11.7 Exercises
    • 11.8 Further reading
  • 12 Advanced forecasting methods
    • 12.1 Complex seasonality
    • 12.2 Prophet model
    • 12.3 Vector autoregressions
    • 12.4 Neural network models
    • 12.5 Bootstrapping and bagging
    • 12.6 Exercises
    • 12.7 Further reading
  • 13 Some practical forecasting issues
    • 13.1 Weekly, daily and sub-daily data
    • 13.2 Time series of counts
    • 13.3 Ensuring forecasts stay within limits
    • 13.4 Forecast combinations
    • 13.5 Prediction intervals for aggregates
    • 13.6 Backcasting
    • 13.7 Very long and very short time series
    • 13.8 Forecasting on training and test sets
    • 13.9 Dealing with outliers and missing values
    • 13.10 Further reading
  • Appendix: Using R
  • Appendix: For instructors
  • Appendix: Reviews
  • Translations
  • About the authors
  • Buy a print version
  • Report an error
  • Bibliography
  • Published by OTexts™ with bookdown

Forecasting: Principles and Practice (3rd ed)

10.4 Stochastic and deterministic trends

There are two different ways of modelling a linear trend. A deterministic trend is obtained using the regression model \[ y_t = \beta_0 + \beta_1 t + \eta_t, \] where \(\eta_t\) is an ARMA process. A stochastic trend is obtained using the model \[ y_t = \beta_0 + \beta_1 t + \eta_t, \] where \(\eta_t\) is an ARIMA process with \(d=1\). In the latter case, we can difference both sides so that \(y_t' = \beta_1 + \eta_t'\), where \(\eta_t'\) is an ARMA process. In other words, \[ y_t = y_{t-1} + \beta_1 + \eta_t'. \] This is similar to a random walk with drift (introduced in Section 9.1), but here the error term is an ARMA process rather than simply white noise.

Although these models appear quite similar (they only differ in the number of differences that need to be applied to \(\eta_t\)), their forecasting characteristics are quite different.

Example: Air transport passengers Australia

aus_airpassengers %>%
  autoplot(Passengers) +
  labs(y = "Passengers (millions)",
       title = "Total annual air passengers")
Total annual passengers (in millions) for Australian air carriers, 1970--2016.

Figure 10.9: Total annual passengers (in millions) for Australian air carriers, 1970–2016.

Figure 10.9 shows the total number of passengers for Australian air carriers each year from 1970 to 2016. We will fit both a deterministic and a stochastic trend model to these data.

The deterministic trend model is obtained as follows:

fit_deterministic <- aus_airpassengers %>%
  model(deterministic = ARIMA(Passengers ~ 1 + trend() +
                                pdq(d = 0)))
report(fit_deterministic)
#> Series: Passengers 
#> Model: LM w/ ARIMA(1,0,0) errors 
#> 
#> Coefficients:
#>          ar1  trend()  intercept
#>       0.9564   1.4151     0.9014
#> s.e.  0.0362   0.1972     7.0751
#> 
#> sigma^2 estimated as 4.343:  log likelihood=-100.88
#> AIC=209.77   AICc=210.72   BIC=217.17

This model can be written as \[\begin{align*} y_t &= 0.901 + 1.415 t + \eta_t \\ \eta_t &= 0.956 \eta_{t-1} + \varepsilon_t\\ \varepsilon_t &\sim \text{NID}(0,4.343). \end{align*}\]

The estimated growth in visitor numbers is 1.42 million people per year.

Alternatively, the stochastic trend model can be estimated.

fit_stochastic <- aus_airpassengers %>%
  model(stochastic = ARIMA(Passengers ~ pdq(d = 1)))
report(fit_stochastic)
#> Series: Passengers 
#> Model: ARIMA(0,1,0) w/ drift 
#> 
#> Coefficients:
#>       constant
#>         1.4191
#> s.e.    0.3014
#> 
#> sigma^2 estimated as 4.271:  log likelihood=-98.16
#> AIC=200.31   AICc=200.59   BIC=203.97

This model can be written as \(y_t-y_{t-1} = 1.419 + \varepsilon_t\), or equivalently \[\begin{align*} y_t &= y_0 + 1.419 t + \eta_t \\ \eta_t &= \eta_{t-1} + \varepsilon_{t}\\ \varepsilon_t &\sim \text{NID}(0,4.271). \end{align*}\]

In this case, the estimated growth in visitor numbers is also 1.42 million people per year. Although the growth estimates are similar, the prediction intervals are not, as Figure 10.10 shows. In particular, stochastic trends have much wider prediction intervals because the errors are non-stationary.

aus_airpassengers %>%
  autoplot(Passengers) +
  autolayer(fit_stochastic %>% forecast(h = 20),
    colour = "#0072B2", level = 95) +
  autolayer(fit_deterministic %>% forecast(h = 20),
    colour = "#D55E00", alpha = 0.65, level = 95) +
  labs(y = "Air passengers (millions)",
       title = "Forecasts from trend models")
Forecasts of annual passengers for Australian air carriers using a deterministic trend model (orange) and a stochastic trend model (blue).

Figure 10.10: Forecasts of annual passengers for Australian air carriers using a deterministic trend model (orange) and a stochastic trend model (blue).

There is an implicit assumption with deterministic trends that the slope of the trend is not going to change over time. On the other hand, stochastic trends can change, and the estimated growth is only assumed to be the average growth over the historical period, not necessarily the rate of growth that will be observed into the future. Consequently, it is safer to forecast with stochastic trends, especially for longer forecast horizons, as the prediction intervals allow for greater uncertainty in future growth.