adamaltmejd / covid

MIT License
88 stars 14 forks source link

Also include lag zero? #23

Closed mhoehle closed 4 years ago

mhoehle commented 4 years ago

https://github.com/adamaltmejd/covid/blob/a2780ce04be4887fafec80c2ba4b826fa3ed6197/src/functions.R#L144-L151

Two questions regarding the referenced code block and it's associated comment:

1) Shouldn't the 21 days in the comment be 14 days instead? I was not able to relate the 21 to anything happening in the code, whereas a 14 days here would make sense due to the date %between% list(ref_date - 14, ref_date) happening a few lines later.

2) Why is there a filtering conditioning on days_since_publication != 0 ? I don't understand why those with a delay of zero are excluded as part of the prediction - wouldn't this also modify the lag 0 cases?

adamaltmejd commented 4 years ago
  1. Its just a leftover from when the calculation was based on 3 weeks. Will fix.
  2. There is no lag at day 0, since then only the same-day data is available.