-
Notifications
You must be signed in to change notification settings - Fork 33
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 filter_leading_zeros
and zero_threshold
to estimate_secondary()
and estimate_truncation()
#608
Conversation
f6b1e15
to
c44c17d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tests are failing - I left a couple of suggestions that I think will fix them.
Co-authored-by: Sebastian Funk <[email protected]>
Co-authored-by: Sebastian Funk <[email protected]>
Co-authored-by: Sebastian Funk <[email protected]>
Co-authored-by: Sebastian Funk <[email protected]>
307fc8e
to
f3d92fc
Compare
This looks good now. I can make the minor changes needed to fix the tests and then, once you @jamesmbaazam approve, we can merge. |
I can't approve because I'm the last pusher. |
…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]>
…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]>
Description
This PR closes #605.
Initial submission checklist
devtools::test()
anddevtools::check()
).devtools::document()
).lintr::lint_package()
).After the initial Pull Request