cmu-delphi / epiforecast-R

R package to implement and visualize several epidemiological forecasting methods.
GNU General Public License v2.0
21 stars 5 forks source link

forecasts with negative values #5

Closed eampo closed 4 years ago

eampo commented 4 years ago

Hello,

Thank you for sharing this tool! I encountered an issue recently where I had negative values for predictions. I'm currently rounding these values up to zero, but just wanted to make sure that this is best practice.

Elijah

brookslogan commented 4 years ago

Some or all of the algorithms were written to apply to potentially negative data (although we've only applied them to >=0 data). We also post-process the forecasts to replace negative values in the simulated trajectories with 0's. I am not sure what the best practice would be, but this sounds reasonable/practical.

(Alternate approach: we could imagine, in methods like delta density, thresholding values as we simulate each time step in sequence, which should reduce the size and frequency of extended <=0 sections, but this may lead to an undesired positive bias in later values in cases where the trajectories rise >0 sometime.)