diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index c1f7a96..094b531 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -26,7 +26,9 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - extra-repositories: 'https://stan-dev.r-universe.dev' + extra-repositories: + https://stan-dev.r-universe.dev, + https://epiforecasts.r-universe.dev - name: Install dependencies uses: r-lib/actions/setup-r-dependencies@v2 diff --git a/.github/workflows/render-readme.yaml b/.github/workflows/render-readme.yaml index e00d225..b06abde 100644 --- a/.github/workflows/render-readme.yaml +++ b/.github/workflows/render-readme.yaml @@ -23,7 +23,9 @@ jobs: uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - extra-repositories: 'https://stan-dev.r-universe.dev' + extra-repositories: + https://stan-dev.r-universe.dev, + https://epiforecasts.r-universe.dev - name: Setup pandoc uses: r-lib/actions/setup-pandoc@v2 diff --git a/sessions.qmd b/sessions.qmd index 12306df..da90949 100644 --- a/sessions.qmd +++ b/sessions.qmd @@ -18,16 +18,23 @@ comments: false ## Session 2: Forecast evaluation -14:10-15:20 +14:10-15:00 -- An overview of forecasting models (10 mins) -- Practice session: Evaluating forecasts from a range of models (60 mins) +- An introduction to forecast evaluation (5 mins) +- Practice session: Evaluating forecasts from a range of models (40 mins) +- Wrap up (5 mins) -15:30-15:50 +## Session 3: Evaluating forecasts from multiple models -- Wrap up and discussion (20 mins) +15:10-15:50 -## Session 3: Forecast ensembles +- Why might we want to evaluate forecasts from multiple models? (5 mins) +- Practice session: Evaluating forecasts from multiple models (40 mins) +- Wrap up (5 mins) + +*There is a coffee break at 15:30-15:40 you are welcome to attend this or keep working through the course material.* + +## Session 4: Forecast ensembles 15:50-17:10 @@ -35,7 +42,7 @@ comments: false - Practice session: Creating forecast ensembles (60 mins) - Wrap up (10 mins) -## Session 4: End of course summary +## Session 5: End of course summary 17:10-17:30 diff --git a/sessions/forecast-ensembles.qmd b/sessions/forecast-ensembles.qmd index 5c3f317..332e8b6 100644 --- a/sessions/forecast-ensembles.qmd +++ b/sessions/forecast-ensembles.qmd @@ -5,7 +5,7 @@ order: 8 # Introduction -As we saw in the [forecast evaluation session](forecast-evaluation-of-multiple-models), different modelling approaches have different strength and weaknesses, and it is not clear a prior which one produces the best forecast in any given situation. +As we saw in the [forecast evaluation session](forecast-evaluation-of-multiple-models), different modelling approaches have different strength and weaknesses, and it is not clear a priori which one produces the best forecast in any given situation. One way to attempt to draw strength from a diversity of approaches is the creation of so-called *forecast ensembles* from the forecasts produced by different models. In this session, we'll build ensembles using forecasts from models of different levels of mechanism vs. statistical complexity. @@ -30,7 +30,7 @@ The source file of this session is located at `sessions/forecast-ensembles.qmd`. ## Libraries used In this session we will use the `nfidd` package to load a data set of infection times and access stan models and helper functions, the `dplyr` and `tidyr` packages for data wrangling, `ggplot2` library for plotting, the `tidybayes` package for extracting results of the inference and the `scoringutils` package for evaluating forecasts. -We will also use `qra` for quantile regression averaging in the weighted ensemble section. +We will also use `qrensemble` for quantile regression averaging in the weighted ensemble section. ```{r libraries, message = FALSE} library("nfidd") @@ -38,7 +38,7 @@ library("dplyr") library("tidyr") library("ggplot2") library("scoringutils") -library("qra") +library("qrensemble") ``` ::: {.callout-tip} diff --git a/sessions/forecast-evaluation-of-multiple-models.qmd b/sessions/forecast-evaluation-of-multiple-models.qmd index ca9b32a..e99469e 100644 --- a/sessions/forecast-evaluation-of-multiple-models.qmd +++ b/sessions/forecast-evaluation-of-multiple-models.qmd @@ -9,7 +9,7 @@ We can classify models along a spectrum by how much they include an understandin These different approaches all have different strength and weaknesses, and it is not clear a prior which one produces the best forecast in any given situation. One way to attempt to draw strength from a diversity of approaches is the creation of so-called *forecast ensembles* from the forecasts produced by different models. -In this session, we'll start with forecasts from models of different levels of mechanism vs. statistical complexity and build ensembles of these models. +In this session, we'll start with forecasts from models of different levels of mechanism vs. statistical complexity and build ensembles of these models. We will then compare the performance of these ensembles to the individual models and to each other. ## Slides @@ -48,7 +48,7 @@ The best way to interact with the material is via the [Visual Editor](https://do ## Initialisation -We set a random seed for reproducibility. +We set a random seed for reproducibility. Setting this ensures that you should get exactly the same results on your computer as we do. ```{r} @@ -117,7 +117,7 @@ ggplot(data, aes(x = t, y = Rt)) + ``` ::: -The key assumptions we are making here are: +The key assumptions we are making here are: - The population is constant and we roughly know the size of the population. - The reproduction number only changes due to susceptible depletion @@ -137,7 +137,7 @@ A statistical term that can be used to describe a time series with a trend is sa More specifically, a _stationary_ time series is defined as one whose statistical properties, such as mean and variance, do not change over time. In infectious disease epidemiology, this would only be expected for endemic diseases without external seasonal influence. -The random walk model we used in the [forecasting visualisation session](forecast-visualisation) is a special case of a more general class of models called _autoregressive (AR) models_. +The random walk model we used in the [forecasting visualisation session](forecast-visualisation) is a special case of a more general class of models called _autoregressive (AR) models_. AR models are a class of models which predict the next value in a time series as a linear combination of the previous values in the time series. The random walk model is specifically a special case of an AR(1) model where the next value in the time series is predicted as the previous value, multiplied by a value between 1 and -1 , plus some noise. This becomes a random walk when the multipled value is 0.