Closed stephenturner closed 3 years ago
(US and state forecasts validate, and checks with note error, warning, notes)
@stephenturner this looks great. before i merge just want to confirm one thing.
when ran the submission script i got an error for write_csv
:
Error in readr::write_csv(submission %>% mutate(forecast_date = this_monday()), :
unused argument (file = submission_filename)
i'm using readr_1.3.1
so i change that to arg from "file" to "path" (https://github.com/signaturescience/focustools/pull/40/commits/2bf0a14634a21a687f50d0590e305490b041b71e)
are you using a version of readr where "file" works ?!?
btw im going to leave the state-level-ts branch deleted for now. i think this is going to be good to go for monday.
@stephenturner this looks great. before i merge just want to confirm one thing.
when ran the submission script i got an error for
write_csv
:Error in readr::write_csv(submission %>% mutate(forecast_date = this_monday()), : unused argument (file = submission_filename)
i'm using
readr_1.3.1
so i change that to arg from "file" to "path" (2bf0a14)are you using a version of readr where "file" works ?!?
uhhh... well this is annoying. I was using tab completion.
https://www.tidyverse.org/blog/2020/10/readr-1-4-0/#argument-name-consistency
Breaking Changes Argument name consistency The first argument to all of the write_() functions, like writecsv() had previously been path. However the first argument to all of the read() functions is file. As of readr 1.4.0 the first argument to both read() and write() functions is file and path is now deprecated.
I'd recommend updating your readr and changing back to file on master?
ts_forecast()
with new bootstrap argument that whenFALSE
extracts prediction intervals at a particular confidence interval from the forecast distribution, rather than resampling. da3f7fb3341cca2f571957da869f14db80b5843dsubmission/submission.R
script to use hilo instead of bootstrapping, and now creates forecasts for all 50 states + DC + US national ac0ef21e54499efeaa3112cd85f9a898234d5604. (The forecast validates if manually forcing the forecast date tothis_monday()
. fixes #26Previously, using bootstrapping resulted in incorrect quantiles for incident death forecasts. See 06 (California) for a particularly egregious example.
This is the same forecast without using bootstrapping/resampling. Note that this change was made to both incident cases and incident deaths. Comparing this to the above, the 25/75 interval is very slightly wider than it was with bootstrapping, but the erroneous intervals we saw with incident deaths is no longer an issue.
Looking at the distribution of quantiles comparing at 06/CA using hilo (left) versus bootstrapping (right) for incident deaths makes the problem (right) and solution (left) apparent.
Updated forecasts visualized for all 50 states + DC + US national:
us-and-states.pdf