Closed vpnagraj closed 3 years ago
@stephenturner @chulmelowe i think i have a first pass at this that is working. relevant code in forecast submission mockup script:
i have not yet figured out how to get the cdeaths from ideaths forecast using this method ...
also, i ran into one oddball issue with validation (see last bullet in the most recent comment in #6 )
when you have a chance please have a look at the code and let me know if it makes sense.
thanks to https://github.com/signaturescience/focustools/pull/12 we now have the cdeaths calculated from ideaths forecasts
we also identified the root of the "oddball issue with validation" (code only works on sunday or monday as written!)
closing out this issue for now.
we've been exploring this already:
https://github.com/signaturescience/focustools/blob/master/scratch/lagged-cases-scratch.R
it would make sense to use lagged cases instead of (or in addition to?) death time series data to forecast deaths.
for
ARIMA
you can add exogenous variables in a formula, which would allow us to use lagged cases and death ts:ARIMA(ideaths ~ lag(icases,3)
or we can use a linear model:
TLSM(ideaths ~ lag(icases,3)
either way we'll need to supply icases data that has been forecast into the future before we can forecast the ideaths. in other words, we would need to be sure to run the icases fit to generate that input data prior to running the ideaths fit.
we should be able to modify the submission prep code (i.e. add an argument at https://github.com/signaturescience/focustools/blob/master/scratch/fable-submission-mockup-allmetrics.R#L49) to accommodate adding the
new_data
object (see https://github.com/signaturescience/focustools/blob/master/scratch/lagged-cases-scratch.R#L66-L67)