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 1 before fitting final week when creating shifted cases #612

Merged
merged 6 commits into from Mar 26, 2024
Merged

Conversation

sbfnk
Copy link
Contributor

@sbfnk sbfnk commented Mar 13, 2024

Description

This PR closes #611 by keeping values constant instead of setting zeroes to 1 (this approach has proven unstable) by adding 1 to the number of confirmed cases before fitting (and subtracting again when using the fit).

Initial submission checklist

  • My PR is based on a package issue and I have explicitly linked it.
  • I have tested my changes locally (using devtools::test() and devtools::check()).
  • I have added or updated unit tests where necessary.
  • I have updated the documentation if required and rebuilt docs if yes (using devtools::document()).
  • I have followed the established coding standards (and checked using lintr::lint_package()).
  • I have added a news item linked to this PR.

After the initial Pull Request

  • I have reviewed Checks for this PR and addressed any issues as far as I am able.

@sbfnk sbfnk force-pushed the fix-611 branch 2 times, most recently from f2f86d3 to fafe2bc Compare March 13, 2024 19:39
jamesmbaazam
jamesmbaazam previously approved these changes Mar 18, 2024
Copy link
Contributor

@jamesmbaazam jamesmbaazam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM. I wonder if this feature should be exposed in the function's documentation?

@sbfnk
Copy link
Contributor Author

sbfnk commented Mar 19, 2024

This LGTM. I wonder if this feature should be exposed in the function's documentation?

Thanks, added some detail in 2ab300e and used the opportunity to improve the example and code documentation (with apologies, slightly deviating from the original Issue).

R/create.R Outdated Show resolved Hide resolved
@sbfnk sbfnk marked this pull request as draft March 20, 2024 09:16
@sbfnk sbfnk changed the title keep small values constant instead of setting to 1 when creating shifted cases add 1 before fitting final week when creating shifted cases Mar 20, 2024
@sbfnk sbfnk marked this pull request as ready for review March 20, 2024 16:06
@sbfnk sbfnk marked this pull request as draft March 22, 2024 08:07
@sbfnk sbfnk marked this pull request as ready for review March 22, 2024 20:49
@sbfnk sbfnk enabled auto-merge (squash) March 22, 2024 20:49
@sbfnk sbfnk disabled auto-merge March 26, 2024 08:23
@sbfnk sbfnk merged commit f322b7b into main Mar 26, 2024
11 checks passed
@sbfnk sbfnk deleted the fix-611 branch March 26, 2024 08:23
sbfnk added a commit that referenced this pull request May 3, 2024
* fit to x+1 and avoid touching zeroes

* add news item

* add details

* add clearer example

* don't use gt for seeding in nonmechanistic model

* add reviewer
sbfnk added a commit that referenced this pull request May 3, 2024
* fit to x+1 and avoid touching zeroes

* add news item

* add details

* add clearer example

* don't use gt for seeding in nonmechanistic model

* add reviewer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-mechanistic model with shifted cases can create explosive exponential growth
2 participants