Introduction

The Baregg Tunnel dataset contains daily traffic counts (number of vehicles) from November 2003 to November 2005. The data is recorded at a daily frequency. The objective of this analysis is to forecast future daily traffic volumes and determine which forecasting model provides the most accurate predictions. Two models are compared: Naïve model Linear Regression model (with trend and weekly seasonality) Forecast accuracy is evaluated using a validation dataset.

Data Exploration

Observations

  • Upward trend over time
  • Clear weekly seasonal patterns
  • Regular daily fluctuations

Data Partitioning

Training: Nov 1, 2003 – Jun 30, 2005 Validation: Jul 1, 2005 – Nov 30, 2005

Model Fitting

## # A tibble: 1 × 10
##   .model .type      ME   RMSE    MAE   MPE  MAPE  MASE RMSSE  ACF1
##   <chr>  <chr>   <dbl>  <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Naive  Test  -12734. 16821. 13606. -12.5  13.1  2.78  1.97 0.376

## # A tibble: 1 × 10
##   .model .type     ME  RMSE   MAE   MPE  MAPE  MASE RMSSE  ACF1
##   <chr>  <chr>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 LinReg Test  -1603. 5869. 3900. -1.82  3.70 0.798 0.686 0.622

Forecast Overlay

Interpretation

  • Naïve forecast is flat

  • Linear Regression captures weekly ups and downs

  • Regression tracks actual traffic more closely

  • Linear Regression MASE < Naive → better performance

Standard accuracy metrics

Manual MASE calculation

Add MASE to table

## # A tibble: 2 × 6
##   Model                  ME   RMSE    MAE  MAPE  MASE
##   <chr>               <dbl>  <dbl>  <dbl> <dbl> <dbl>
## 1 Naive             -12734. 16821. 13606. 13.1  1.44 
## 2 Linear Regression  -1603.  5869.  3900.  3.70 0.414

Residual diagnostics for Linear Regression

Conclusion

This report compared two forecasting models: the Naïve model and the Linear Regression model with trend and weekly seasonality. To evaluate performance, we used forecast accuracy measures, especially MASE (Mean Absolute Scaled Error). A MASE value closer to 0 indicates better forecast accuracy. If MASE is less than 1, the model performs better than the Naïve benchmark. The Linear Regression model produced a much lower MASE value than the Naïve model. Since its MASE is closer to 0, it provides more accurate predictions for future traffic volumes. Therefore, the Linear Regression model is the better forecasting approach for the Baregg Tunnel data