-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
filter_leading_zeros
and zero_threshold
to `estimate_secondar…
…y()` and `estimate_truncation()` (#608) * Add filter_leading_zeros and zero_threshold to estimate_secondary() * Add filter_leading_zeros and zero_threshold to estimate_truncation() * Call create_clean_reported_cases() in estimate_truncation() * Remove breakpoint column created by create_clean_reported_cases() * Add tests for the new arguments * Fix wrong object name * Remove unnecessary anonymous function to map * Introduce an add_breakpoints argument to control adding a breakpoint column * Set add_breakpoint to FALSE to not create a breakpoint column * Document add_breakpoint argument * Merge reports with secondary_reports after filtering leading zeroes * Fix nested ifelse statement * Remove trailing whitespace * Update tests/testthat/test-estimate_secondary.R Co-authored-by: Sebastian Funk <[email protected]> * Replace anonymous function shorthand * Add PR and reviewer Co-authored-by: Sebastian Funk <[email protected]> * Only replace NA with 0 if breakpoint column is present * Only merge by date on secondary_reports Co-authored-by: Sebastian Funk <[email protected]> * Fix test Co-authored-by: Sebastian Funk <[email protected]> * Make sure all the datasets have the same start date * Improve test to compare aspects of fits to original dataset * move filtering up * bring back copying (don't modify input object) * use rstan in tests --------- Co-authored-by: Sebastian Funk <[email protected]>
- Loading branch information
1 parent
7f25782
commit 0743eeb
Showing
9 changed files
with
138 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters