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

remove dependency to using Rstudio in weekly processing workflow #564

Closed
ManuelaRunge opened this issue Dec 23, 2020 · 1 comment · Fixed by #565
Closed

remove dependency to using Rstudio in weekly processing workflow #564

ManuelaRunge opened this issue Dec 23, 2020 · 1 comment · Fixed by #565
Assignees
Labels
clean-up code improvement Can be coded more efficiently

Comments

@ManuelaRunge
Copy link
Collaborator

  • estimate Rt using epyestim in python instead of epiestim in R
  • other plotting scripts are the iteration comparison plot and the recent seroprevalence plot, that are optional
  • the fitting script could also be rewritten in python (lower priority)
@ManuelaRunge ManuelaRunge added clean-up code improvement Can be coded more efficiently labels Dec 23, 2020
@ManuelaRunge ManuelaRunge self-assigned this Dec 23, 2020
@ManuelaRunge
Copy link
Collaborator Author

In this pull request:

Rfiles changed to python:
get_Rt_forCivisOutputs.R -> estimate_Rt_forCivisOutputs.py
get_Rt_from_LineListData.R -> estimate_Rt_from_LL.py
compare_simulation_iterations.R -> iteration_comparison.py

Rfiles not yet changed to python (lower priority)
seroprevalence_plot.R
fit_to_data_spatial.R
bar_plot_script.R
county_populations.R

Note on EpiEstim versus epyestim

  • Epyestim seems to not translate 1:1 to Epiestim, it uses bootsrap instead of MCMC and the confidence intervals depend more on the number of cases as for EpiEstim.
  • Epyestim further includes infection-to-delay distribution, while it was not clear whether this was included in EpiEstim.
  • EpiEstim with a smoothing window of 13 resulted in smoother estimates than epyestim with the same window (in epyestim one can specify smoothing window for new cases, as well as rolling average window for rt estimates). To get closest Rt estimates over time, epyestim was run with a smoothing window of 18 days (see plot).
  • Serial interval distributions are similar, but sampled in Epiestim and fixed in epyestim.

Nevertheless moving to epyestim seems beneficial as it removes dependencies to the R-software.

Both 14 day window (Epiestim 13)
rtplot_14.png

13 versus 28 day window
rtplot.png

Serial interval distributions
EpiEstim (custom specified mean at 4.6, based on Nishiura et al )
si_dist_epi.png

epyestim (default for COVID, mean at 4.3 based on Flaxman et al)
si_dist_epy.png

@ManuelaRunge ManuelaRunge linked a pull request Jan 5, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean-up code improvement Can be coded more efficiently
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant