Preface
1
Introduction
1.1
Stergiou and Christou 1996
1.1.1
Hellenic landings data
1.2
The landings data, landings.RData
1.3
ts objects
1.3.1
ts()
function
1.3.2
ggplot and ts objects
1.3.3
Plotting using a data frame
1.4
Packages
1.5
References
2
Time-varying regression
2.1
Fitting
2.1.1
Orthogonal polynomials
2.1.2
Residual diagnostics
2.1.3
Compare to Stergiou and Christou
2.1.4
Summary
2.2
Forecasting
2.2.1
The forecast package
2.3
Summary
3
ARIMA Models
3.1
Overview
3.1.1
Components of an ARIMA model
3.1.2
Box-Jenkins method
3.1.3
ACF and PACF functions
3.2
Stationarity
3.2.1
Definition
3.2.2
Non-stationarity
3.2.3
Stationarity tests
3.2.4
Differencing the data
3.2.5
Summary
3.3
Model structure
3.3.1
AR and MA lags
3.3.2
Model order
3.3.3
Choosing the AR and MA levels
3.3.4
Trace = TRUE
3.3.5
stepwise = FALSE
3.3.6
Summary
3.4
Fitting ARIMA models
3.4.1
Fitting with
auto.arima()
3.4.2
Outputting the models tested
3.4.3
Repeat with the sardine data
3.4.4
Missing values
3.4.5
Fit a specific ARIMA model
3.4.6
Model checking
3.4.7
Workflow for non-seasonal data
3.4.8
Stepwise vs exhaustive model selection
3.4.9
Summary
3.5
Forecasting
3.5.1
Forecasting with
forecast()
3.5.2
Missing values
3.5.3
Null forecast models
4
Exponential smoothing models
4.1
Overview
4.1.1
Naive model
4.1.2
Exponential smoothing
4.1.3
Exponential smoothing model
4.2
ets()
function
4.2.1
The weighting function
4.2.2
Decomposing your model fit
4.3
ETS with trend
4.3.1
Exponential smoothing model with trend
4.3.2
Produce forecast using a previous fit
4.4
Forecast performance
4.4.1
Test forecast performance
4.4.2
Testing a specific ets model
4.5
Further Reading
5
Testing forecast accuracy
5.1
Training set/test set
5.1.1
Forecast versus actual
5.2
Cross-Validation
5.2.1
Variable window
5.2.2
Fixed window
5.2.3
Cross-validation farther into the future
5.3
Metrics
5.3.1
accuracy()
function
5.3.2
Test multiple models
5.3.3
Cross-validation
5.4
Candidate model set
5.5
Testing the candidate model set
5.5.1
Fit each of our candidate models
5.6
Models fit
5.6.1
Metrics for each model
6
Covariates
6.1
Covariates used in Stergiou and Christou
Preparing the data frame
6.1.1
Creating the data frame for model fitting
6.2
Collinearity
6.2.1
Effect of collinearity
6.3
Variable selection
6.3.1
Model selection with stepwise variable selection
6.3.2
Model selection with cross-validation
6.4
Penalized regression
6.4.1
Ridge Regression
6.4.2
Lasso
6.4.3
Elastic net
6.5
Relative importance metrics
6.6
Orthogonalization
6.7
Prediction accuracy
6.8
Discussion
7
Auto-regressive models with covariates
7.1
Multivariate linear regression with ARMA errors
7.1.1
Example: fitting with auto.arima
7.1.2
Example: fitting with arima and sarima
7.1.3
Example: fitting with gls
7.1.4
MREG of first or second differences
7.1.5
Discussion
7.2
ARMAX Models
7.2.1
Discussion
8
Seasonality
8.1
Chinook data
Load the chinook salmon data set
Plot seasonal data
8.2
Seasonal Exponential Smoothing Model
8.2.1
Force seasonality to evolve more
8.3
Seasonal ARIMA model
8.4
Missing values
8.5
Forecast evaluation
References
Appendix
A
Inputting data
one response variable
Many response variables
Many response variables, two time variables
One response variable, multiple explanatory variables
B
Downloading ICOADS covariates
Published with bookdown
Fisheries Catch Forecasting
Chapter 7
Auto-regressive models with covariates