Skip to content
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

Fix calculation of daily new infections #189

Closed
cjbayesian opened this issue Mar 23, 2020 · 4 comments · Fixed by #190
Closed

Fix calculation of daily new infections #189

cjbayesian opened this issue Mar 23, 2020 · 4 comments · Fixed by #190
Assignees
Labels
bug Something isn't working models Correct/improve the underlying models

Comments

@cjbayesian
Copy link
Collaborator

cjbayesian commented Mar 23, 2020

Current daily new infections are being calculated as $I_{t+1} - I_{t}$, which doesn't account for the infected cases transitioning into recovered during that time step. The calculations should be $I_{new} = (I_{t+1} - I_{t}) + (R_{t+1} - R_{t})$

@cjbayesian cjbayesian added the bug Something isn't working label Mar 23, 2020
@cjbayesian cjbayesian self-assigned this Mar 23, 2020
@cjbayesian
Copy link
Collaborator Author

projection_admits = projection.iloc[:-1, :] - projection.shift(1)

@cjbayesian
Copy link
Collaborator Author

Not apples to apples, but here is the fixed output on the pre-refactored code:
image

@cjbayesian
Copy link
Collaborator Author

Working on getting the fix implemented on refactored code.

@PhilMiller
Copy link
Collaborator

Please add the 'models' label to this, so I can link to models Correct/improve the underlying models in the app header, and have it reflect the list of changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working models Correct/improve the underlying models
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants