1.3.3 CRAN Release
This release adds a range of new minor features, squashes bugs, enhances documentation, expands unit testing, implements some minor run-time optimisations, and removes some obsolete features.
Thanks to @Bisaloo, @hsbadr, @LloydChapman, @medewitt, and @sbfnk for contributing to this release.
Thanks to @sbfnk, @pearsonca, and @nicholasdavies for regression testing this release against 1.3.2
.
New features
- Added supported to
simulate_infections
so that adata.frame
of R samples can be passed in instead of a vector of R values. By @seabbs. - Added extraction of posterior samples to the summary method for
estimate_infections
. By @seabbs. - Exposed
zero_threshold
to users allowing for control over when zeros or NAs in count data are treated as true zeros versus as reporting errors that require some smoothing. By @seabbs. - Added support for varying the length of the day of the week effect (see
obs_opts()
). This allows, for example, fitting to data with cases only reported every 3 days. By @seabbs. - Adds option to
plot_estimates()
and higher level functions to choose which estimate type to plot. By @seabbs. - Adds support for fixed generation times (either mean only or fixed gamma distributed). By @sbfnk.
- Adds support for optionally using an inverse gamma prior for the lengthscale of the gaussian process. This scaled prior has been tested for both short and long simulations where the default prior may make the model unstable. The new prior is more stable for long simulations and adaptively change the distribution based on the simulation length (total number of days) without relying on the user inputs or the fixed defaults. It can be tested by setting ls_sd = 0 in gp_opts(). By @hsbadr.
- Updated the prior on the magnitude of the gaussian process to be 0.05 vs 0.1 leading to slightly more stable estimates. By @hsbadr.
- Added an argument (
plot
) toregional_summary
to allow plotting to be optional. Closes #250. By @seabbs in #317
Model changes
- Added support for varying the length of the day of the week effect (see
obs_opts()
). This allows, for example, fitting to data with cases only reported every 3 days. - Minor optimisations in the observation model by only using the
target
likelihood definition approach when required and in the use offmax
andfmin
over using if statements. By @seabbs. - Added support for users setting the overdispersion (parameterised as one over the square root of phi) of the reporting process. This is accessible via the
phi
argument ofobs_opts
with the default of a normal distribution with mean 0 and standard deviation of 1 truncated at 0 remaining unchanged. By @seabbs. - Added additive noise term to the
estimate_truncation
model to deal with zeroes. By @sbfnk. - Switched to using optimised versions of the discretised distributions supported for the
reporting delay and the generation time. These are based on an implementation inepinowcast
by Adrian Lison and Sam Abbott. By @seabbs in #320.
Documentation
- Updates to all synthetic delays to reduce runtime of examples. By @seabbs.
- Additional statements to make it clear to users examples should be used for real world analysis. By @seabbs.
- Additional context in the README on package functionality. By @seabbs.
- Added some work in progress model definitions and a resource list for case studies using the package. By @seabbs.
Package changes
- Added a
contributing.md
to guide contributors and addedpre-commit
support to check new contributions styling. By @seabbs. - Better test skipping thanks to @Bisaloo.
- Switched from
cowplot::theme_cowplot()
toggplot2::theme_bw()
. This allows the removal ofcowplot
as a dependency as well making plots visible for users saving as pngs and using a dark theme. By @seabbs. - By default
epinow
and downstream functions remove leading zeros. Now this is optional with the newfilter_leading_zeros
option. Thanks to @LloydChapman in #285. - Basic tests have been added to cover
estimate_secondary()
,forecast_secondary()
, andestimate_truncation()
. By @seabbs in #315. - Add basic snapshot tests for
adjust_infection_to_report
. By @seabbs in #316. - Update to use
rstantools
to manage compiler flags. - Update the Dockerfile to work better with vscode.
Other changes
- Updated the classification of growth to use stable rather than unsure when Rt is approximately 1. By @seabbs.
- The default parallisation has been changed to
future::multisession()
fromfuture::multiprocess()
as the latter is being depreciated in thefuture
package. By @seabbs and @sbfnk. - Ensure the seeding time is at least the maximum generation time (@sbfnk).
Deprecated features
simulate_cases()
andforecast_infections()
have been deprecated and have been removed. These functions depend onEpiSoon
which itself is archived and near equivalent functionality is available withinEpiNow2
and in other packages (@seabbs).- Functions supporting secondary forecasting using
forecast_infections()
(i.e in `epinow())
have been removed along with the arguments that supported them (@seabbs). global_map()
,country_map()
, andtheme_map()
have all been deprecated and have been removed. These functions were used to support reporting of reproduction number
estimates and are considered out of scope forEpiNow2
. If finding useful contacting the
EpiNow2
developers (@seabbs).
Bug fixes
- Fixed a bug in the deconvolution Rt estimation method where the mean of the generation time was being used as the standard deviation. For the default package generation time these are close and so the impact will be limited but in cases where the standard deviation is << than the mean this should result in more accurate Rt estimates. By @seabbs.
- Fixed a bug where the number of threads used by the data.table package were set to one in the global environment. Now the number of threads used by data.table are set to whatever the used specified on exit. By @medewitt.
- Fixed a bug in
simulate_infections
andforecast_secondary
which meant that a Poisson observation model used for estimation would lead to a error. By @seabbs. - Fixed a bug where
use_rt = FALSE
did not properly cancel user settings. By @sbfnk. - Fixed a bug in
estimate_truncation
where phi was not initialised. By @sbfnk. - Fixed a bug where
zero_threshold
was being ignored and so no post-processing was happening. To maintain backwards compatibility the default has been changed toInf
(i.e. no zero threshold). By @LloydChapman in #285.
PRs
- sort table by hidden numeric columns by @sbfnk in #265
- Read summary table in report template by @sbfnk in #266
- fixed generation times or distributions by @sbfnk in #276
- GP: lengthscale: Use inverse-gamma prior if
ls_sd = 0
by @hsbadr in #257 - Update README.Rmd by @pitmonticone in #263
- Fix a typo in _regional-summary.Rmd by @pitmonticone in #278
- change deprecated future::multiprocess -> multicore by @sbfnk in #289
- ensure seeding_time is at least max_gt by @sbfnk in #275
- ensure correct parameters if
use_rt=FALSE
by @sbfnk in #274 - initialise phi in
estimate_truncation
by @sbfnk in #300 - fix rt = NULL case by @sbfnk in #302
- deal with zeroes in
estimate_truncation
by @sbfnk in #301 - only call truncate if truncation is modelled by @sbfnk in #304
- don't pass R to update_Rt by @sbfnk in #303
- fix CRAN issues by @sbfnk in #309
- fix estimate_secondary example by @sbfnk in #314
- Add option for filtering leading zeros and correct zero_threshold by @LloydChapman in #285
- Fixed a few typos by @pitmonticone in #306
- Add estimate_secondarry and estimate_truncation simple tests by @seabbs in #315
- Add tests adjust to report by @seabbs in #316
- Add plot arg to regional_summary by @seabbs in #319
- Optimisations and updates for CRAN check by @seabbs in #320
- Add skeleton for documentation by @seabbs in #321
- Final changes for 1.3.3 by @seabbs in #322
- fix typo by @sbfnk in #323
- update in progress message for docs by @seabbs in #324
- spell check by @seabbs in #325
- fix typo by @sbfnk in #326
- revert dev version by @seabbs in #327
- update rendered README by @seabbs in #328
- Develop by @seabbs in #329
New Contributors
- @LloydChapman made their first contribution in #285
Full Changelog: 1.3.3...v1.3.3