Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add forecasting vignette #6

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Add forecasting vignette #6

wants to merge 24 commits into from

Conversation

EmilieFinch
Copy link
Collaborator

This PR adds a vignette outlining an example forecasting workflow using relative R0 values estimated with the temperature_r0 function within a gam forecasting framework. This is exploratory work, and the vignette documents current limitations and ideas for potential future directions.

This PR also updates the fiji_2014 dataset to include population size, needed for forecasting.

Copy link

This pull request:

  • Adds 4 new dependencies (direct and indirect)
  • Adds 1 new system dependencies
  • Removes 0 existing dependencies (direct and indirect)
  • Removes 0 existing system dependencies

Reach out on slack (#code-review or #help channels) to double check if there are base R alternatives to the new dependencies.

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

Copy link

github-actions bot commented Dec 3, 2024

This pull request:

  • Adds 4 new dependencies (direct and indirect)
  • Adds 1 new system dependencies
  • Removes 0 existing dependencies (direct and indirect)
  • Removes 0 existing system dependencies

Reach out on slack (#code-review or #help channels) to double check if there are base R alternatives to the new dependencies.

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

Copy link

github-actions bot commented Dec 3, 2024

This pull request:

  • Adds 5 new dependencies (direct and indirect)
  • Adds 1 new system dependencies
  • Removes 0 existing dependencies (direct and indirect)
  • Removes 0 existing system dependencies

Reach out on slack (#code-review or #help channels) to double check if there are base R alternatives to the new dependencies.

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

Copy link

github-actions bot commented Dec 5, 2024

This pull request:

  • Adds 5 new dependencies (direct and indirect)
  • Adds 1 new system dependencies
  • Removes 0 existing dependencies (direct and indirect)
  • Removes 0 existing system dependencies

Reach out on slack (#code-review or #help channels) to double check if there are base R alternatives to the new dependencies.

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

Copy link

github-actions bot commented Dec 5, 2024

This pull request:

  • Adds 5 new dependencies (direct and indirect)
  • Adds 1 new system dependencies
  • Removes 0 existing dependencies (direct and indirect)
  • Removes 0 existing system dependencies

Reach out on slack (#code-review or #help channels) to double check if there are base R alternatives to the new dependencies.

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

Copy link
Member

@adamkucharski adamkucharski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sharing. I'm getting an error in gam-forecasting-workflow.Rmd but otherwise looks good. Will also look at tidying up linting in gam-simulation-workflow.Rmd before merge.


```{r}

all_forecasts <- NULL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting this error for this chunk:

Generating forecasts for prediction week starting: 2014-01-06
Warning: basis dimension is larger than number of unique covariatesError in select(train_data, date, date_numeric, rR0, log_pop_susceptible,  : 
  unused arguments (date, date_numeric, rR0, log_pop_susceptible, log_weighted_lagged_cases, cases)

Now we wrangle the Fiji 2014 data for forecasting and set our forecast horizon (how many weeks ahead we want to forecast) and the dates we would like our forecasts to start from.

```{r}
model_data <- fiji_2014 |>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to define pop? Have pushed an edit

Added dplyr::select avoid namespace clash with dplyr and MASS…

Also edited date matching that didn’t seem to be working in `weekly_forecasts[[match(prediction_start,prediction_dates)]] `
Copy link

github-actions bot commented Dec 5, 2024

This pull request:

  • Adds 5 new dependencies (direct and indirect)
  • Adds 1 new system dependencies
  • Removes 0 existing dependencies (direct and indirect)
  • Removes 0 existing system dependencies

Reach out on slack (#code-review or #help channels) to double check if there are base R alternatives to the new dependencies.

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

Fix S and allow flexibility on lagged cases
Copy link

github-actions bot commented Dec 6, 2024

This pull request:

  • Adds 5 new dependencies (direct and indirect)
  • Adds 1 new system dependencies
  • Removes 0 existing dependencies (direct and indirect)
  • Removes 0 existing system dependencies

Reach out on slack (#code-review or #help channels) to double check if there are base R alternatives to the new dependencies.

(Note that results may be inaccurate if you branched from an outdated version of the target branch.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants