-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
This pull request:
Reach out on slack ( (Note that results may be inaccurate if you branched from an outdated version of the target branch.) |
This uses TSIR-like forward propagation
New example to be incorporated
Also convert rR0 to log(rR0) in GLM for consistency
Use offset for R0 and infections, allow coefficient to represent S^n
Data not yet in package
This pull request:
Reach out on slack ( (Note that results may be inaccurate if you branched from an outdated version of the target branch.) |
This pull request:
Reach out on slack ( (Note that results may be inaccurate if you branched from an outdated version of the target branch.) |
This pull request:
Reach out on slack ( (Note that results may be inaccurate if you branched from an outdated version of the target branch.) |
This pull request:
Reach out on slack ( (Note that results may be inaccurate if you branched from an outdated version of the target branch.) |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 |> |
There was a problem hiding this comment.
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)]] `
This pull request:
Reach out on slack ( (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
This pull request:
Reach out on slack ( (Note that results may be inaccurate if you branched from an outdated version of the target branch.) |
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.