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

Update probability_*() functions #82

Merged
merged 13 commits into from
Jan 23, 2024
Merged

Update probability_*() functions #82

merged 13 commits into from
Jan 23, 2024

Conversation

joshwlambert
Copy link
Member

This PR updates the probability_*() functions (probability_epidemic(), probability_extinct() and probability_contain()) from comments from #77.

Changes include:

  • The calculation previously in probability_epidemic() has been moved to probability_extinct() as it is slightly simpler, and probability_epidemic() is now a wrapper function.
  • The optimisation to find the probability of extinction has been moved to a new internal function .fit(). This allows either numerical optimisation (using optim()) or the original grid search implementation.
  • The probability_*() functions now accept dynamic dots and {rlang} has been taken on a package dependency.
  • Tests are added for .fit() and reference values for other tests are updated.
  • The %||% operator has been added to the package.

Smaller changes include: the proportion_*() function documentation is updated as they do not have dynamic dots, new tests for probability_epidemic(), and updating the CITATION.cff and WORDLIST.

@joshwlambert joshwlambert added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 23, 2024
@joshwlambert joshwlambert merged commit 9b81a82 into main Jan 23, 2024
8 checks passed
@joshwlambert joshwlambert deleted the updt_probability branch January 23, 2024 17:35
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.

2 participants