-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comparison of EpiEstim::wallinga_teunis and R0::est.R0.TD #94
Comments
Hi @tamas-ferenci, thanks for submitting the issue. We've also recently seen problems with this function in #92, which I naively try to fix in #93 but unfortunately I am not really familiar with the methods involved here. You could try my fix, but I think I'd be surprised if this changes things for you. @zkamvar or @robin-thompson are either of you familiar with this method and would be able to review the code? Otherwise, do you know somebody who could? |
Thanks @jstockwin , I tried it, but indeed to no avail. As otherwise it is producing the same results as |
Thanks for reporting this and sorry for the slow reply. I think what happens is that EpiEstim ignores the incidence after day 30 while R0 does not. I will try to fix this asap. |
@tamas-ferenci, so actually I don't think what we are doing is wrong, as when using only the truncated incidence as input as you do in. your example, the estimated effective reproduction number should indeed go to zero toward the present (this is a known issue of right censoring in the WT method). There have been some methods developed to fix this right censoring issue but we implemented the most simple version of WT here. If you use the whole curve you get a result much more similar to the R0 package, see my example below. Therefore I think the R0 package must somehow make assumptions about future incidence to fix the right censoring issue, which we don't do. Please note atm you need to run the below code from branch
|
Thanks @annecori for the answer, and sorry for the late reply! My best guess is that the solution is the following sentence from the I agree that this is definitely not a bug, so at this point I think it's really up to you to either close this issue, or change it from "bug" to "enhancement", if you may decide at some point in the future to implement this extension of WT by Cauchemez to account for right censoring (which would be a nice addition in my opinion!). Thanks again for your feedback! |
The package
R0
has a function calledest.R0.TD
which - I believe - does the same asEpiEstim
'swallinga_teunis
.Indeed, results are almost identical if you consider the following example:
However, the story is different is you use only the initial part of the epidemic:
The result from
EpiEstim
starts to go to zero as we are approaching the end of the data, whileR0
keeps a realistic trajectory.I tried both functions on many epidemic curves, but the overall impression was the same: if we are in the middle of an epidemic,
EpiEstim
's results will go to zero at the end of the observation period, whileR0
provides feasible results even at the end of the data.I don't know the mechanics of both functions in detail, but I was wondering if this is an error in
EpiEstim
or there is some other explanation for this phenomenon.The text was updated successfully, but these errors were encountered: