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

Add heterogeneous contacts R function and vignette #71

Merged
merged 20 commits into from
Jan 9, 2024
Merged

Conversation

joshwlambert
Copy link
Member

This PR addresses and closes #55, by adding one new function calc_network_R() and one new vignette heterogeneous_network_outbreaks.Rmd.

The new function calculates both the unadjusted and adjusted reproduction number, see #55 for explanation. The vignette gives two use cases of the function from the epidemiological literature. The references.json file is updated to include new references cited in the vignette.

The {scales} package is added as a suggested dependency to handle plot axes labelling.

Tests and documentation is added for calc_network_R().


Notes for draft

@adamkucharski please check the function is working as you expected and that the function documentation is correctly describing the method.

@sbfnk I cannot reproduce the values from Endo et al. (2022) for the second figure in the new vignette. I've read through the main text and supplementary material for the values used. It also looks like the calculation to produce Fig 2A from that paper differs from calc_network_R(). Please let me know if I should update the values input into the function and whether some numerical differences given different formulations are expected.

The new vignette is best viewed by running pkgdown::build_site().

@joshwlambert joshwlambert added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 15, 2023
@joshwlambert joshwlambert changed the title ***Draft PR***: Add heterogeneous contacts R function and vignette Draft PR: Add heterogeneous contacts R function and vignette Dec 15, 2023
@adamkucharski
Copy link
Member

Thanks, I've suggested a few edits to the markdown, which hopefully also explains the difference in assumptions with the Endo et al analysis.

@joshwlambert joshwlambert marked this pull request as ready for review January 5, 2024 13:56
@joshwlambert
Copy link
Member Author

@adamkucharski thanks for the updates. I have now made this PR live and will merge the changes at the start of next week. This PR will be the last of the changes for the next version release (v0.2.0).

@joshwlambert joshwlambert changed the title Draft PR: Add heterogeneous contacts R function and vignette Add heterogeneous contacts R function and vignette Jan 5, 2024
@joshwlambert
Copy link
Member Author

Closing and reopening the PR to trigger workflows after GHA commit.

@joshwlambert joshwlambert reopened this Jan 9, 2024
@joshwlambert joshwlambert merged commit 452e4f9 into main Jan 9, 2024
9 checks passed
@joshwlambert joshwlambert deleted the network_r branch January 9, 2024 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adjusting R for heterogeneity in contacts (links with network models)
3 participants