Closed seabbs closed 2 years ago
What is negative spreading? Not a concept I've come across before
Sorry if unclear so all it is another approach for handling negative cases with the idea that they come from earlier in time or in the past. The most basic way to do that is to just loop over the dates and set them to 0 until you have replaced the number that were originally negative.
How do you envision this? Like having the function from the link in processing.R
and then have an option to use negative spreading adding to DataClass
as a field?
I was thinking of it as an optional function that you would use instead of replacing negatives with 0 as some people don't like that assumption/they may know the data better.
Cool, I will wirte up a PR and we can go from there
This issue has been flagged as stale due to lack of activity
@joseph-palmer any progress on this? Happy to push back out to any takers if no time?
Appologies, not got much time at the moment! I will try and free up some time to work more on the package.
no pressure at all to do so - can just unpin you as the assignee :)
This issue has been flagged as stale due to lack of activity
At the moment our processing defaults to setting negatives to zero. Another option to consider is spreading negative counts either into the future or into the past.
An implementation of future spreading for a vector is here: https://github.com/epiforecasts/covid-rt-brazil-subregional/blob/master/R/utils.R
This could be generalised into a function for either direction (forward or back) and to accept data frames (with grouping potentially assumed in our current workflow).