This data set shows the bikers on Brooklyn Bridge 7 days of the week compared to the number on all bridges to give us the rate that bikers travel the Brooklyn bridge.
Since this is monthly data, frequency =7 will be used the define the time series object because there are 7 days of the week.
US bond monthly rates
Notice that the classical decomposition method does not work as well as the STL method due to the robustness of the LOESS component. The following visual representations show the different behaviors of the two methods of decomposition.
Classical decomposition of additive time series
STL decomposition of additive time series
Training and Testing Data
We hold up the last 4 periods of data for testing. The rest of the historical data will be used to train the forecast model.
We split the training into 4 different groups and test them.
We next perform error analysis.
| MSE | MAPE | |
|---|---|---|
| n.11 | 0.0003780 | 0.1045434 |
| n.8 | 0.0003767 | 0.1040872 |
| n. 8 | 0.0006108 | 0.1473792 |
| n. 4 | 0.0003912 | 0.1148960 |
The n=11 and the first n=8 have similar mean squared errors 0.0003780 and 0.0003767. They also have very similar Mean absolute percentage errors with 0.1045434 and 0.1040872 respectively
Comparing forecast errors
The graph above shows the error curves for the different models. you can see that first two have the lowest error and are roughly the same numbers.