layout: true .hheader[<a href="index.html"><svg style="height:0.8em;top:.04em;position:relative;fill:steelblue;" viewBox="0 0 576 512"><path d="M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z"/></svg></a>] --- class: center, middle, inverse # Forecasting Time Series ## Eli Holmes .large[_University of Washington<br>School of Aquatic and Fisheries Sciences<br>Seattle, WA_] .futnote[Eli Holmes, UW SAFS] .citation[eeholmes@uw.edu] --- ## Forecasting Time Series This week we will learn a number of standard approaches for forecasting from time series alone--meaning without any covariates or exogenous variables. At the end of the week, we will address how to incorporate covariates into a time series forecast. --- ## Many approaches are available for non-seasonal modeling .pull-left.left[ *Stergiou and Christou 1996* - Time-varying regression - Box-Jenkins models, aka ARIMA models - Multivariate time-series approaches - Harmonic regression - Dynamic regression - Vector autoregression (MAR) - Exponential smoothing (2 variants) - Exponential surplus yield model (FOX) ] .pull-right.left[ *Georgakarakos et al. 2006* - Box-Jenkins models, aka ARIMA models - Artificial neural networks (ANNs) - Bayesian dynamic models *Lawer 2016* - Box-Jenkins models, aka ARIMA models - Artificial neural networks (ANNs) - Exponential Smoothing (6 variants) ] --- ## Forecasting Time Series We will focus on three of these methods. We will start with time-varying regression as it is simple to apply and understand. The rest of the week we will learn about ARIMA models which have a long tradition and Exponential smoothing models, which are newer and often best performing. - Time-varying regression - Box-Jenkins models, aka ARIMA models - Exponential Smoothing --- ## Stergiou and Christou 1996 I will demonstrate these methods by replicating the work in Stergiou and Christou (1996) Modelling and forecasting annual fisheries catches: comparison of regression, univariate and multivariate time series methods. Fisheries Research 25: 105-136. ![Stergiou and Christou 1996](./figs/StergiouChristou1996.png) --- ## Data We will use the annual landings data from Hellenic (Greek) waters that were used in Stergiou and Christou (1996). Stergiou and Christou analyzed 16 species. We will look two of the species: Anchovy and Sardine. Stergiou and Christou used the data from 1964-1989. We have the data up to 2007, but will focus mainly on 1964-1989 (the first half of the time series) to replicate Stergiou and Christou's analyses. --- ![Area where data were collected](./figs/Greece.png) --- ![Statistical Reports](./figs/StatisticalReportCover.png) --- ![Statistical Report Table IV](./figs/StatisticalReportTableIV.png) --- Load the data as follows and use only the 1964-1989 data. ```r load("landings.RData") landings$log.metric.tons = log(landings$metric.tons) landings = subset(landings, Year <= 1989) landings = subset(landings, Species %in% c("Anchovy","Sardine")) ggplot(landings, aes(x=Year, y=log.metric.tons)) + geom_line() + facet_wrap(~Species) ``` <img src="Forecasting-1---Introduction_files/figure-html/load_data-1.png" style="display: block; margin: auto;" />