Unmarked Assignment: Precipitation Forecast

This worksheet introduces you to ARIMA modeling using a precipitation time series recorded at a station near Marburg.

After completing this worksheet you should have gained some first experience with time series data and have extended your case-study knowledge about the pitfalls of model selection.

Things you need for this worksheet

DWD station 3164 Coelbe

The required station data can be downloaded directly from the German Weather Service (DWD) via its Server. In addition to Cölbe, you will also find all stations available for Germany.

The station recordings are divided by variable into historical and recent records. Historical records generally extend to near the end of the previous year; recent records cover the period since then.

From the data provided, we will require the dataset starting from July 2006.

Predicting precipitation

In this first time series exercise, we will try to find an ARIMA model for predicting monthly precipitation data. The model should be selected based on its capability measured by the RMSE for predicting the last two years of the provided time series.

For the model selection, any ARIMA parameter combination of p, d, q and the corresponding seasonal components ps, ds, qs should be tested for

  • p between 0 and 5,
  • d between 0 and 2,
  • q between 0 and 5,
  • ps between 0 and 2,
  • ds between 0 and 2, and
  • qs between 0 and 2.

Please write an R Markdown (.Rmd) document with HTML output in which the performance for predicting monthly precipitation of an ARIMA model with all of the possible parameter combinations above is tested.

The performance should be tested using the RMSE between predicted and observed monthly precipitation for the last two full years of the dataset. Please print the parameters (i.e. p, d, q…) as well as the AIC and RMSE of your optimal model and compare them with the corresponding values retrieved using the forecast::auto.arima function (for the latter you can just use the summary function although it gives more information than necessary). Please also visualize the prediction of your model and the automatically retrieved one in a simple plot (one for each model) and add the actually observed values to the plot. Write a one-sentence statement about the differences.

Save your R Markdown (.Rmd) document in your course repository, knit it, update (i.e. commit) your local repository and publish (i.e. push) it to GitHub. Make sure that the created HTML file is also part of your course repository on GitHub.

You can of course use 6 lapply loops for iterating over the parameters or you can have a look at the expand.grid function which realizes any combination of the supplied parameters in a single data frame which can easily be used for this task.

Have a look at the respective metadata for details on the format of the German Weather Service data.

Updated: