Draft
Conversation
Contributor
|
Thank you for your contribution @micahwiesner67 🚀! Your pkgdown-site is ready for download 👉 here 👈! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft PR for CI purposes. Between the current version of EpiNow2 (1.6.1) and the latest non-dev version (1.7.1) some of the mechanics of how gp or horizon options are input has changed and thus code in the R/fit_model.R file needs to be adjusted accordingly. The documentation for EpiNow2 can help with this.
Initially, test-write_output.R had the most failing tests. This was due to the process_quantiles function now outputting an additional two columns (accumulate, breakpoint) which are not expected in the test-write_output.R tests. Also these columns contain NAs forcing other tests to also fail out.
Currently, we are passing all unit tests. An initial test run between current version (1.6.1) and latest version (1.7.1) shows slightly different results and version 1.7.1 shows diagnostic flags being triggered.
Update (8/15/25) this was partially improved by adjusting the rt prior sd to 1.0 from 0.2 (these are suggested defaults from EpiNow2 package)
Accomplished:
Refactored to address issue in rt_opts
Refactored to accomodate filter_leading_zeros new format in latest version
Refactored forecast / horizon syntax
Included "breakpoint" and "accumulate" (these are new columns added in 1.7.1.9000 dev version) in the process_samples and process_quantiles expected columns tests in test-write_output.R. Also necessary to remove these columns before testing columns for NAs as these populate with NAs
Adjusted adapt_delta in gostic_fit to lower p_divergent under diagnostic_flag; Also, adjusted rt prior mean to 2 for gostic_toy_rt
Switched confirm column in setup.R to use obs_incidence instead of incidence
Notes:
Default alpha_sd has been changed between versions (from 0.05 to 0.01)
Update (7/11/25): I diffed the fit.R file between version 1.6.1 and 1.7.1 and found few differences. I also diffed the opts.R file between the two versions and there are many areas of code which have been refactored, but none jump out to me as changing any default model parameters
Update (7/15/25):
Diagnostics extracted from a fit on the gostic_toy_rt data yields very similar results.
image
image
Diagnostics from re-running on 1.7.1 w/ new priors vs. 1.6.1 with old priors still shows 1.7.1 has more divergences (6 state:disease pairs, compared to 3 with 1.6.1s setup). After analyzing these diagnostic files, none of the state:disease pairs with divergences have other diagnostic_flags (none have high_rhat or exceeded max_treedepths)