You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Fishery Catch Forecasting](https://fish-forecast.github.io/Fish-Forecast-Bookdown/index.html): Replicates and discusses 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.
43
+
44
+
<center>
45
+
{width=25%}
46
+
</center>
47
+
48
+
49
+
34
50
35
51
## Why include covariates in a model?
36
52
37
-
* You want to forecast something using covariates
38
-
*We are often interested in knowing the cause of variation
39
-
*Covariates can explain the process that generated the patterns
40
-
*Covariates can help deal with problematic observation errors
41
-
* You are using covariates to model a changing system
42
-
* You want to get rid of trends or cycles
53
+
* You want to forecast something using covariates...but you don't actually care about the covariates.
54
+
*You want to forecast something using covariates...and you do care about the covariates.
55
+
*You are trying to understand the **cause of variation**. You are interested in the covariates effects because they can explain the process that generated the patterns.
56
+
*You are using covariates to model a changing system.
57
+
* You are using covariates to help deal with problematic observation errors.
y <- uschange[,"Consumption"]; d <- uschange[,"Income"]
136
-
fit <- lm(y~d)
137
-
checkresiduals(fit)
177
+
fit <- lm(y~d); checkresiduals(fit)
138
178
```
139
179
140
180
## Let `auto.arima()` find best model
@@ -146,7 +186,9 @@ checkresiduals(fit)
146
186
147
187
## Collinearity
148
188
149
-
This a big issue. If you are thinking about stepwise variable selection, do a literature search on the issue. Read the chapter in [Holmes 2018: Chap 6](https://fish-forecast.github.io/Fish-Forecast-Bookdown/6-1-multivariate-linear-regression.html) on catch forecasting models using multivariate regression for a discussion of
189
+
This a big issue. Always do a simple `pairs()` plot (or similar) on your explanatory variables.
190
+
191
+
Read the chapter in [Holmes 2018: Chap 6](https://fish-forecast.github.io/Fish-Forecast-Bookdown/6-covariates.html) on catch forecasting models for a discussion of
150
192
151
193
* Stepwise variable regression in R
152
194
* Cross-validation for regression models
@@ -156,6 +198,39 @@ This a big issue. If you are thinking about stepwise variable selection, do a l
156
198
* Elastic Net
157
199
* Diagnostics
158
200
201
+
## Simple diagnostics `pairs()`
202
+
203
+
```
204
+
X = matrix (or data frame) with vars in columns
205
+
pairs(X)
206
+
```
207
+
<center>
208
+
{width=50%}
209
+
</center>
210
+
211
+
212
+
## Simple diagnostics `pairs()`
213
+
214
+
```
215
+
X = matrix (or data frame) with vars in columns
216
+
pairs(X)
217
+
```
218
+
<center>
219
+
{width=50%}
220
+
</center>
221
+
222
+
223
+
## Simple diagnostics `corrplot()`
224
+
225
+
```
226
+
library(corrplot)
227
+
corrplot::corrplot(cor(X))
228
+
```
229
+
<center>
230
+
{width=50%}
231
+
</center>
232
+
233
+
159
234
## ARMAX
160
235
161
236
ARMAX models are different. In this case, the covariates affect the amount the auto-regressive process changes each time step.
0 commit comments