1,721,036 research outputs found
epiforecasts/scoringutils: scoringutils version 1.1.0
A minor update to the package with some bug fixes and minor changes.
Feature updates
Package updates
Removed the on attach message which warned of breaking changes in 1.0.0.
Renamed the metric argument of summarise_scores() to relative_skill_metric. This argument is now deprecated and will be removed in a future version of the package. Please use the new argument instead.
Updated the documentation for score() and related functions to make the soft requirement for a model column in the input data more explicit.
Updated the documentation for score(), pairwise_comparison() and summaris_scores() to make it clearer what the unit of a single forecast is that is required for computations
Simplified the function plot_pairwise_comparison() which now only supports plotting mean score ratios or p-values and removed the hybrid option to print both at the same time.
Bug fixes
Missing baseline forecasts in pairwise_comparison() now trigger an explicit and informative error message.
The requirements table in the getting started vignette is now correct.
Added support for an optional sample column when using a quantile forecast format. Previously this resulted in an error.
List of Pull Requests
Fix 223 issue with add_coverage by @seabbs in https://github.com/epiforecasts/scoringutils/pull/234
Test explicitly on minimum supported R version by @Bisaloo in https://github.com/epiforecasts/scoringutils/pull/236
use deparse instead of deparse1 by @nikosbosse in https://github.com/epiforecasts/scoringutils/pull/237
Specify which column name clashes with metrics by @Bisaloo in https://github.com/epiforecasts/scoringutils/pull/239
Fix separate results by @nikosbosse in https://github.com/epiforecasts/scoringutils/pull/243
fix pit histogram plot in #240 by @nikosbosse in https://github.com/epiforecasts/scoringutils/pull/247
Fix requirements table in getting-started vignette by @damonbayer in https://github.com/epiforecasts/scoringutils/pull/249
Reformatting to comply with JSS requirements by @nikosbosse in https://github.com/epiforecasts/scoringutils/pull/251
Fix ggplot2 update by @nikosbosse in https://github.com/epiforecasts/scoringutils/pull/252
update test by @nikosbosse in https://github.com/epiforecasts/scoringutils/pull/254
don't error if baseline model is not present by @sbfnk in https://github.com/epiforecasts/scoringutils/pull/250
1.1.0 by @seabbs in https://github.com/epiforecasts/scoringutils/pull/258
add infra for develop branch by @seabbs in https://github.com/epiforecasts/scoringutils/pull/259
Issue 248 by @seabbs in https://github.com/epiforecasts/scoringutils/pull/256
Documentation: Update README by @seabbs in https://github.com/epiforecasts/scoringutils/pull/262
Docmentation: update score and related documentation to mention the model column by @seabbs in https://github.com/epiforecasts/scoringutils/pull/260
Feature: add enhanced treatment of sample as a protected column by @seabbs in https://github.com/epiforecasts/scoringutils/pull/261
simplify plot_pairwise_comparison() by @nikosbosse in https://github.com/epiforecasts/scoringutils/pull/263
Make forecast unit clearer by @nikosbosse in https://github.com/epiforecasts/scoringutils/pull/264
New Contributors
@damonbayer made their first contribution in https://github.com/epiforecasts/scoringutils/pull/249
Full Changelog: https://github.com/epiforecasts/scoringutils/compare/v1.0.0...v1.1.
epiforecasts/scoringutils: scoringutils 1.2.0
<p>This major release contains a range of new features and bug fixes that have been introduced in minor releases since <code>1.1.0</code>. The most important changes are:</p>
<ul>
<li>Documentation updated to reflect changes since version 1.1.0, including new transform and workflow functions.</li>
<li>New <code>set_forecast_unit()</code> function allows manual setting of forecast unit.</li>
<li><code>summarise_scores()</code> gains new <code>across</code> argument for summarizing across variables.</li>
<li>New <code>transform_forecasts()</code> and <code>log_shift()</code> functions allow forecast transformations. See the documentation for <code>transform_forecasts()</code> for more details and an example use case.</li>
<li>Input checks and test coverage improved for bias functions.</li>
<li>Bug fix in <code>get_prediction_type()</code> for integer matrix input.</li>
<li>Links to scoringutils paper and citation updates.</li>
<li>Warning added in <code>interval_score()</code> for small interval ranges.</li>
<li>Linting updates and improvements.</li>
</ul>
<p>Thanks to @nikosbosse, @seabbs, and @sbfnk for code and review contributions. Thanks to @bisaloo for the suggestion to use a linting GitHub Action that only triggers on changes, and @adrian-lison for the suggestion to add a warning to <code>interval_score()</code> if the interval range is between 0 and 1.</p>
Package updates
<ul>
<li>The documentation was updated to reflect the recent changes since <code>scoringutils 1.1.0</code>. In particular, usage of the functions <code>set_forecast_unit()</code>, <code>check_forecasts()</code> and <code>transform_forecasts()</code> are now documented in the Vignettes. The introduction of these functions enhances the overall workflow and help to make the code more readable. All functions are designed to be used together with the pipe operator. For example, one can now use something like the following:</li>
</ul>
<pre><code class="lang-r">example_quantile |>
set_forecast_unit(c("model", "location", "forecast_date", "horizon", "target_type")) |>
check_forecasts() |>
score()
</code></pre>
<p>Documentation for the <code>transform_forecasts()</code> has also been extended. This functions allows the user to easily add transformations of forecasts, as suggested in the paper <a href="https://www.medrxiv.org/content/10.1101/2023.01.23.23284722v1">"Scoring epidemiological forecasts on transformed scales"</a>. In an epidemiological context, for example, it may make sense to apply the natural logarithm first before scoring forecasts, in order to obtain scores that reflect how well models are able to predict exponential growth rates, rather than absolute values. Users can now do something like the following to score a transformed version of the data in addition to the original one:</p>
<pre><code class="lang-r">data <- example_quantile[true_value > 0, ]
data |>
transform_forecasts(fun = log_shift, offset = 1) |>
score() |>
summarise_scores(by = c("model", "scale"))
</code></pre>
<p>Here we use the <code>log_shift()</code> function to apply a logarithmic transformation to the forecasts. This function was introduced in <code>scoringutils 1.1.2</code> as a helper function that acts just like <code>log()</code>, but has an additional argument <code>offset</code> that can add a number to every prediction and observed value before applying the log transformation.</p>
Feature updates
<ul>
<li>Made <code>check_forecasts()</code> and <code>score()</code> pipeable (see issue #290). This means that
users can now directly use the output of <code>check_forecasts()</code> as input for
<code>score()</code>. As <code>score()</code> otherwise runs <code>check_forecasts()</code> internally anyway
this simply makes the step explicit and helps writing clearer code.</li>
</ul>
What's Changed
<ul>
<li>tweak code samples to avoid issues with CRAN by @nikosbosse in <a href="https://github.com/epiforecasts/scoringutils/pull/266">https://github.com/epiforecasts/scoringutils/pull/266</a></li>
<li>Make boolean vector explicitly numeric when computing interval scores by @nikosbosse in <a href="https://github.com/epiforecasts/scoringutils/pull/274">https://github.com/epiforecasts/scoringutils/pull/274</a></li>
<li>Add a transform_forecasts() function by @nikosbosse in <a href="https://github.com/epiforecasts/scoringutils/pull/278">https://github.com/epiforecasts/scoringutils/pull/278</a></li>
<li>create proposal for a add_transformation function by @nikosbosse in <a href="https://github.com/epiforecasts/scoringutils/pull/271">https://github.com/epiforecasts/scoringutils/pull/271</a></li>
<li>update contents of metrics table by @nikosbosse in <a href="https://github.com/epiforecasts/scoringutils/pull/280">https://github.com/epiforecasts/scoringutils/pull/280</a></li>
<li>Add warning interval score by @nikosbosse in <a href="https://github.com/epiforecasts/scoringutils/pull/281">https://github.com/epiforecasts/scoringutils/pull/281</a></li>
<li>Edit pass on transform_forecasts and NEWS by @seabbs in <a href="https://github.com/epiforecasts/scoringutils/pull/283">https://github.com/epiforecasts/scoringutils/pull/283</a></li>
<li>Linting overhaul by @seabbs in <a href="https://github.com/epiforecasts/scoringutils/pull/284">https://github.com/epiforecasts/scoringutils/pull/284</a></li>
<li>Update protected cols by @nikosbosse in <a href="https://github.com/epiforecasts/scoringutils/pull/292">https://github.com/epiforecasts/scoringutils/pull/292</a></li>
<li>update branch from master by @nikosbosse in <a href="https://github.com/epiforecasts/scoringutils/pull/291">https://github.com/epiforecasts/scoringutils/pull/291</a></li>
<li>Add set forecast unit by @nikosbosse in <a href="https://github.com/epiforecasts/scoringutils/pull/293">https://github.com/epiforecasts/scoringutils/pull/293</a></li>
<li>fix badges by @sbfnk in <a href="https://github.com/epiforecasts/scoringutils/pull/298">https://github.com/epiforecasts/scoringutils/pull/298</a></li>
<li>Issue 272: Add an across argument to summarise_scores() by @seabbs in <a href="https://github.com/epiforecasts/scoringutils/pull/302">https://github.com/epiforecasts/scoringutils/pull/302</a></li>
<li>Corrections to metrics vignette by @sbfnk in <a href="https://github.com/epiforecasts/scoringutils/pull/307">https://github.com/epiforecasts/scoringutils/pull/307</a></li>
<li>fix quantile/sample mixup in vignette by @sbfnk in <a href="https://github.com/epiforecasts/scoringutils/pull/308">https://github.com/epiforecasts/scoringutils/pull/308</a></li>
<li>Issue 301: Address coverage gaps in bias.R by @seabbs in <a href="https://github.com/epiforecasts/scoringutils/pull/305">https://github.com/epiforecasts/scoringutils/pull/305</a></li>
<li>scoringutils 1.2.0 release by @nikosbosse in <a href="https://github.com/epiforecasts/scoringutils/pull/299">https://github.com/epiforecasts/scoringutils/pull/299</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/epiforecasts/scoringutils/compare/v1.1.0...v1.2.0">https://github.com/epiforecasts/scoringutils/compare/v1.1.0...v1.2.0</a></p>
epiforecasts/simplified-forecaster-evaluation: Presubmission release
This release represents the full extent of the work prior to presubmission checks. All data and code is present in the repository.
What's Changed
Close #2 from @kathsherratt by @seabbs in https://github.com/epiforecasts/simplified-forecaster-evaluation/pull/11
Fix scoringutils reference by @nikosbosse in https://github.com/epiforecasts/simplified-forecaster-evaluation/pull/20
New Contributors
@seabbs made their first contribution in https://github.com/epiforecasts/simplified-forecaster-evaluation/pull/11
@nikosbosse made their first contribution in https://github.com/epiforecasts/simplified-forecaster-evaluation/pull/20
Full Changelog: https://github.com/epiforecasts/simplified-forecaster-evaluation/commits/v1.0.
epiforecasts/epinowcast: Epinowcast 0.1.0
epinowcast 0.1.0
This is a major release focusing on improving the user experience, and preparing for future package extensions, with an increase in modularity, development of a flexible and full-featured formula interface, and hopefully future-proofing as far as possible. This prepares the ground for future model extensions which will allow a broad range of real-time infectious disease questions to be better answered. These extensions include:
Modelling missing data (#43).
Non-parametric modelling of delay and reference day logit hazard (#4).
Flexible expectation modelling (#5).
Forecasting beyond the horizon of the data (#3).
Known reporting structures (#33).
Renewal equation-based reproduction number estimation (potentially part of #5).
Latent infections (i.e as implemented in other packages such as EpiNow2, epidemia, etc.).
Convolution-based delay models (i.e hospitalisations and deaths) with partially reported data.
Additional observation models.
If interested in contributing to these features, or other aspects of package development (for example improving post-processing, the coverage of documentation, or contributing case studies) please see our contributing guide and/or just reach out. This is a community project that needs support from its users in order to provide improved tools for real-time infectious disease surveillance.
This release contains multiple breaking changes. If needing the old interface please install 0.0.7 from GitHub. For ease, we have stratified changes below into interface, package, documentation, and model changes. Note the package is still flagged as experimental but is in regular use by the authors.
@adrian-lison, @sbfnk, and @seabbs contributed to this release.
Interface
A fully featured and flexible formula interface has been added that allows the specification of fixed effects, lme4 random effects, and random walks. See #27 by @seabbs.
A major overhaul, as described in #57, to the interface of epinowcast() with a particular focus on improving the modularity of the model components (described as modules in the documentation). All of the package documentation and vignettes have been updated to reflect this new interface. See #112 by @seabbs.
Package
Renamed the package and updated the description to give more clarity about the problem space it focusses on. See #110 by @seabbs.
A new helper function enw_delay_metadata() has been added. This produces metadata about the delay distribution vector that may be helpful in future modelling. This prepares the way for #4 where this data frame will be combined with the reference metadata in order to build non-parametric hazard reference and delay-based models. In addition to adding this function, it has also been added to the output of enw_preprocess_data() in order to make the metadata readily available to end-users. See #80 by @seabbs.
Two new helper functions enw_filter_reference_dates() and enw_filter_report_dates() have been added. These replace enw_retrospective_data() but allow users to similarly construct retrospective data. Splitting these functions out into components also allows for additional use cases that were not previously possible. Note that by definition it is assumed that a report date for a given reference date must be equal or greater (i.e a report cannot happen before the event being reported occurs). See #82 by @sbfnk and @seabbs.
The internal grouping variables have been refactored to reduce the chance of clashes with columns in the data frames supplied by the user. There will also be an error thrown in case of a variable clash, making preprocessing safer. See #102 by @adrian-lison and @seabbs, which solves #99.
Support for preprocessing observations with missing reference dates has been added along with a new data object returned by enw_preprocess_data() that highlights this information to the user (alternatively can be accessed by users using enw_missing_reference()). In addition, these missing observations have been setup to be passed to stan in order to allow their use in modelling. This feature is in preparation of adding full support for missing observations (see #43). See
#106 by @adrian-lison and @seabbs.
The discretised reporting probability function has been extended to handle delays beyond the maximum delay in three different ways: ignore, add to maximum, or normalize. The nowcasting model uses "normalise" though work on this is ongoing. See #113 by @adrian-lison and #121 by @seabbs.
Fixed an issue (#105) with cmdstan 2.30.0 where passing optimisation flags to stanc_options by default was causing a compilation error by not passing these flags by default. See #117 by @sbfnk and @seabbs.
Addition of regression/integration tests against example data for epinowcast() and enw_preprocess_data() with convergence checking for several example nowcasting models. Lower level tests for model tools and model modules have also been added. See #112 by @seabbs.
Model
Added support for parametric exponential delay distributions (note that this is comparable to an intercept-only non-parametric hazard model) and potentially no parametric delay (though this will currently throw an error due to the lack of appropriate non-parametric hazard). See #84 by @seabbs.
Added support for a Poisson observation model though it is recommended that most users make use of the default negative binomial model. See #120 by @seabbs.
Updated the expectation random walk model to use a more efficient cumulative_sum implementation suggested by @adrian-lison in #98]. See #103 by @seabbs.
Aligned the implementation of the overdispersion prior with the prior choice recommendations from the stan wiki. See #111 by @adrian-lison.
Documentation
The model description has been updated to reflect the currently implemented model and to improve readability. The use of reference and report date nomenclature has also been standardised across the package. See #71 by @sbfnk and @seabbs.
Internals
Array declarations in the stan model have been updated. To maintain compatibility with expose_stan_fns() (which itself depends on rstan), additional functionality has been added to parse stan code in this function. See #74, #85, and #93 by @sbfnk and @seabbs.
Remove spurious warnings due to missing initial values for optional parameters. See #76 by @sbfnk and @seabbs.
Pull requests linked to this release
Feature: Add formula interface by @seabbs in https://github.com/epiforecasts/epinowcast/pull/27
ensure all parameters are initialised by @sbfnk in https://github.com/epiforecasts/epinowcast/pull/77
Feature: Add metadelay by @seabbs in https://github.com/epiforecasts/epinowcast/pull/80
future-proof array declarations by @sbfnk in https://github.com/epiforecasts/epinowcast/pull/75
Feature: exponential delays by @seabbs in https://github.com/epiforecasts/epinowcast/pull/84
compatibility with rstan for exposing functions by @sbfnk in https://github.com/epiforecasts/epinowcast/pull/85
Update contributing to include use of develop branch system by @seabbs in https://github.com/epiforecasts/epinowcast/pull/86
Bug safer regex by @seabbs in https://github.com/epiforecasts/epinowcast/pull/93
clarify use of enw_retrospective_data by @sbfnk in https://github.com/epiforecasts/epinowcast/pull/82
Feature cumulative sum expectation by @seabbs in https://github.com/epiforecasts/epinowcast/pull/103
Replace group with .group by @adrian-lison in https://github.com/epiforecasts/epinowcast/pull/102
model description clarifications by @sbfnk in https://github.com/epiforecasts/epinowcast/pull/71
Feature missing reference dates preprocessing by @seabbs in https://github.com/epiforecasts/epinowcast/pull/106
Feature: Update title, description, and citation by @seabbs in https://github.com/epiforecasts/epinowcast/pull/110
Change prior transformation from inv_sqrt to inv_square by @adrian-lison in https://github.com/epiforecasts/epinowcast/pull/111
Update discretised_reporting_prob by @adrian-lison in https://github.com/epiforecasts/epinowcast/pull/113
Fix compilation issue from cmdstan 2.30.0 by @seabbs in https://github.com/epiforecasts/epinowcast/pull/117
Roll back to excluding data beyond the maximum delay by @seabbs in https://github.com/epiforecasts/epinowcast/pull/121
Feature: Redesign interface by @seabbs in https://github.com/epiforecasts/epinowcast/pull/112
Feature: Add support for Poisson observation models by @seabbs in https://github.com/epiforecasts/epinowcast/pull/120
Release 0.1.0 by @seabbs in https://github.com/epiforecasts/epinowcast/pull/125
New Contributors
@sbfnk made their first contribution in https://github.com/epiforecasts/epinowcast/pull/77
Full Changelog: https://github.com/epiforecasts/epinowcast/compare/v0.0.7...v0.1.
epiforecasts/EpiNow2: 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 a data.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) to regional_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 of fmax and fmin 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 of obs_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 in epinowcast 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 added pre-commit support to check new contributions styling. By @seabbs.
Better test skipping thanks to @Bisaloo.
Switched from cowplot::theme_cowplot() to ggplot2::theme_bw(). This allows the removal of cowplot 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 new filter_leading_zeros option. Thanks to @LloydChapman in #285.
Basic tests have been added to cover estimate_secondary(), forecast_secondary(), and estimate_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() from future::multiprocess() as the latter is being depreciated in the future package. By @seabbs and @sbfnk.
Ensure the seeding time is at least the maximum generation time (@sbfnk).
Deprecated features
simulate_cases() and forecast_infections() have been deprecated and have been removed. These functions depend on EpiSoon which itself is archived and near equivalent functionality is available within EpiNow2 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(), and theme_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 for EpiNow2. 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 and forecast_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 to Inf (i.e. no zero threshold). By @LloydChapman in #285.
Pull requests
sort table by hidden numeric columns by @sbfnk in https://github.com/epiforecasts/EpiNow2/pull/265
Read summary table in report template by @sbfnk in https://github.com/epiforecasts/EpiNow2/pull/266
fixed generation times or distributions by @sbfnk in https://github.com/epiforecasts/EpiNow2/pull/276
GP: lengthscale: Use inverse-gamma prior if ls_sd = 0 by @hsbadr in https://github.com/epiforecasts/EpiNow2/pull/257
Update README.Rmd by @pitmonticone in https://github.com/epiforecasts/EpiNow2/pull/263
Fix a typo in _regional-summary.Rmd by @pitmonticone in https://github.com/epiforecasts/EpiNow2/pull/278
change deprecated future::multiprocess -> multicore by @sbfnk in https://github.com/epiforecasts/EpiNow2/pull/289
ensure seeding_time is at least max_gt by @sbfnk in https://github.com/epiforecasts/EpiNow2/pull/275
ensure correct parameters if use_rt=FALSE by @sbfnk in https://github.com/epiforecasts/EpiNow2/pull/274
initialise phi in estimate_truncation by @sbfnk in https://github.com/epiforecasts/EpiNow2/pull/300
fix rt = NULL case by @sbfnk in https://github.com/epiforecasts/EpiNow2/pull/302
deal with zeroes in estimate_truncation by @sbfnk in https://github.com/epiforecasts/EpiNow2/pull/301
only call truncate if truncation is modelled by @sbfnk in https://github.com/epiforecasts/EpiNow2/pull/304
don't pass R to update_Rt by @sbfnk in https://github.com/epiforecasts/EpiNow2/pull/303
fix CRAN issues by @sbfnk in https://github.com/epiforecasts/EpiNow2/pull/309
fix estimate_secondary example by @sbfnk in https://github.com/epiforecasts/EpiNow2/pull/314
Add option for filtering leading zeros and correct zero_threshold by @LloydChapman in https://github.com/epiforecasts/EpiNow2/pull/285
Fixed a few typos by @pitmonticone in https://github.com/epiforecasts/EpiNow2/pull/306
Add estimate_secondarry and estimate_truncation simple tests by @seabbs in https://github.com/epiforecasts/EpiNow2/pull/315
Add tests adjust to report by @seabbs in https://github.com/epiforecasts/EpiNow2/pull/316
Add plot arg to regional_summary by @seabbs in https://github.com/epiforecasts/EpiNow2/pull/319
Optimisations and updates for CRAN check by @seabbs in https://github.com/epiforecasts/EpiNow2/pull/320
Add skeleton for documentation by @seabbs in https://github.com/epiforecasts/EpiNow2/pull/321
Final changes for 1.3.3 by @seabbs in https://github.com/epiforecasts/EpiNow2/pull/322
fix typo by @sbfnk in https://github.com/epiforecasts/EpiNow2/pull/323
update in progress message for docs by @seabbs in https://github.com/epiforecasts/EpiNow2/pull/324
spell check by @seabbs in https://github.com/epiforecasts/EpiNow2/pull/325
fix typo by @sbfnk in https://github.com/epiforecasts/EpiNow2/pull/326
revert dev version by @seabbs in https://github.com/epiforecasts/EpiNow2/pull/327
update rendered README by @seabbs in https://github.com/epiforecasts/EpiNow2/pull/328
Develop by @seabbs in https://github.com/epiforecasts/EpiNow2/pull/329
New Contributors
@LloydChapman made their first contribution in https://github.com/epiforecasts/EpiNow2/pull/285
Full Changelog: https://github.com/epiforecasts/EpiNow2/compare/1.3.3...v1.3.
epiforecasts/EpiNow2: 1.3.4 release
EpiNow2 1.3.4
<p>This release focusses on bug fixes and package infrastructure updates along with a few quality of life improvements such as enabling the use of fixed delays and generation times.</p>
<p>Thanks to @seabbs, and @sbfnk and for <a href="https://www.sacema.org/">SACEMA</a> for hosting @seabbs whilst some of the development work on this release was being done.</p>
Breaking changes
<ul>
<li>To streamline the interface with the definition of delay distributions <code>trunc_opts()</code> now takes a single argument (<code>dist</code>) which defines the truncation delay rather than a arbitrary list of arguments (which was previously used to define the distribution).</li>
<li>Updated the handling of generation times in the renewal equation to be left truncation adjusted for the zeroth day. This more better the approach taken to estimate generation times but may slightly impact estimates vs those produced using previous versions.</li>
<li>The range of the <code>frac_obs</code> parameter has restricted with an upper bound of 1 to reflect its name and description. This may impact a small number of edge case uses with the majority being models fit using <code>estimate_secondary()</code>. By @sbfnk in #340.</li>
</ul>
Features
<ul>
<li>Adds a new function <code>simulate_secondary()</code> for simulating secondary observations under the generative process model assumed by <code>estimate_secondary</code>. Unlike <code>forecast_secondary()</code> which uses a <code>stan</code> model to simulate secondary cases (which shares code with the <code>estimate_secondary</code> model) this new function is implemented entirely in R and is therefore useful to sense check any results from the <code>stan</code> implementation.</li>
<li>Adds support for fixed delays (mean only or fixed lognormal distributed) or truncations (fixed lognormal distributed), and for pre-computing these delays as well as generation times if they are fixed. By @sbfnk and @seabbs.</li>
<li>Support for gamma distributed delays and log-normal distributed generation times.</li>
</ul>
Package
<ul>
<li>Update the GitHub Action files to new versions.</li>
<li>Switched to using <code>seq_along()</code> rather than <code>1:length()</code> in all package code.</li>
<li>Fixed a broken example in the documentation for <code>regional_runtimes()</code>.</li>
<li>Add compatibility changes for the latest version of <code>rstan</code> and <code>rstantools</code>.</li>
<li>Remove legacy use of <code>pkgnet</code> for package dependency visualisation.</li>
<li>Restyled all code using <code>styler</code>.</li>
<li>Dropped dependency on <code>RcppParallel</code>.</li>
<li>Updated <code>report_cases</code> to work with the new <code>delay_opts</code> helper function.</li>
<li>Added test coverage for <code>report_cases</code> though note this function will likely be deprecated in future releases.</li>
<li>Switched to <code>linewidth</code> in <code>plot_CrIs</code> rather than <code>size</code> to avoid issues with <code>ggplot2</code> 3.4.0.</li>
<li>Set up validation against synthetic data to run as a CI check.</li>
<li>Added tests for internal stan convolution functions.</li>
<li>Update all <code>get_</code> distribution functions to return the distribution as well as summary
parameters.</li>
<li>Added support for model fitting benchmarking using <code>touchstone</code>.</li>
</ul>
Documentation
<ul>
<li>Slight edits to the model outline for <code>estimate_infections()</code>.</li>
<li>Updated examples to make use of fixed distributions.</li>
</ul>
Bugs
<ul>
<li>Fixed a bug in <code>simulate_infections()</code> where passing a custom number of samples would cause the input vector of R values to be replicated in a column-wise fashion meaning that the intended R trajectory was not simulated.</li>
<li>Fixed a bug in the <code>estimate_infections()</code> deconvolution model where the generation time was not correctly being reversed.</li>
</ul>
Pull requests
<ul>
<li>add more flexibility with delays by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/305">https://github.com/epiforecasts/EpiNow2/pull/305</a></li>
<li>documentation fixes and deprecation warning by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/335">https://github.com/epiforecasts/EpiNow2/pull/335</a></li>
<li>fixes to small issues introduced by PR #305 by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/336">https://github.com/epiforecasts/EpiNow2/pull/336</a></li>
<li>bug fix: return_likelihood check by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/333">https://github.com/epiforecasts/EpiNow2/pull/333</a></li>
<li>upper bound <code>frac_obs</code> by 1 by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/340">https://github.com/epiforecasts/EpiNow2/pull/340</a></li>
<li>secondary features by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/310">https://github.com/epiforecasts/EpiNow2/pull/310</a></li>
<li>Develop by @seabbs in <a href="https://github.com/epiforecasts/EpiNow2/pull/343">https://github.com/epiforecasts/EpiNow2/pull/343</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/epiforecasts/EpiNow2/compare/v1.3.3...v1.3.4">https://github.com/epiforecasts/EpiNow2/compare/v1.3.3...v1.3.4</a></p>
epiforecasts/EpiNow2: 1.3.3 CRAN Release
<p>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.</p>
<p>Thanks to @Bisaloo, @hsbadr, @LloydChapman, @medewitt, and @sbfnk for contributing to this release.</p>
<p>Thanks to @sbfnk, @pearsonca, and @nicholasdavies for regression testing this release against <code>1.3.2</code>.</p>
New features
<ul>
<li>Added supported to <code>simulate_infections</code> so that a <code>data.frame</code> of R samples can be passed in instead of a vector of R values. By @seabbs.</li>
<li>Added extraction of posterior samples to the summary method for <code>estimate_infections</code>. By @seabbs.</li>
<li>Exposed <code>zero_threshold</code> 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.</li>
<li>Added support for varying the length of the day of the week effect (see <code>obs_opts()</code>). This allows, for example, fitting to data with cases only reported every 3 days. By @seabbs.</li>
<li>Adds option to <code>plot_estimates()</code> and higher level functions to choose which estimate type to plot. By @seabbs.</li>
<li>Adds support for fixed generation times (either mean only or fixed gamma distributed). By @sbfnk.</li>
<li>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.</li>
<li>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.</li>
<li>Added an argument (<code>plot</code>) to <code>regional_summary</code> to allow plotting to be optional. Closes #250. By @seabbs in #317</li>
</ul>
Model changes
<ul>
<li>Added support for varying the length of the day of the week effect (see <code>obs_opts()</code>). This allows, for example, fitting to data with cases only reported every 3 days. </li>
<li>Minor optimisations in the observation model by only using the <code>target</code> likelihood definition approach when required and in the use of <code>fmax</code> and <code>fmin</code> over using if statements. By @seabbs.</li>
<li>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 <code>phi</code> argument of <code>obs_opts</code> with the default of a normal distribution with mean 0 and standard deviation of 1 truncated at 0 remaining unchanged. By @seabbs.</li>
<li>Added additive noise term to the <code>estimate_truncation</code> model to deal with zeroes. By @sbfnk.</li>
<li>Switched to using optimised versions of the discretised distributions supported for the
reporting delay and the generation time. These are based on an implementation in <a href="https://package.epinowcast.org/"><code>epinowcast</code></a> by Adrian Lison and Sam Abbott. By @seabbs in #320.</li>
</ul>
Documentation
<ul>
<li>Updates to all synthetic delays to reduce runtime of examples. By @seabbs.</li>
<li>Additional statements to make it clear to users examples should be used for real world analysis. By @seabbs.</li>
<li>Additional context in the README on package functionality. By @seabbs.</li>
<li>Added some work in progress model definitions and a resource list for case studies using the package. By @seabbs.</li>
</ul>
Package changes
<ul>
<li>Added a <code>contributing.md</code> to guide contributors and added <code>pre-commit</code> support to check new contributions styling. By @seabbs.</li>
<li>Better test skipping thanks to @Bisaloo.</li>
<li>Switched from <code>cowplot::theme_cowplot()</code> to <code>ggplot2::theme_bw()</code>. This allows the removal of <code>cowplot</code> as a dependency as well making plots visible for users saving as pngs and using a dark theme. By @seabbs.</li>
<li>By default <code>epinow</code> and downstream functions remove leading zeros. Now this is optional with the new <code>filter_leading_zeros</code> option. Thanks to @LloydChapman in #285.</li>
<li>Basic tests have been added to cover <code>estimate_secondary()</code>, <code>forecast_secondary()</code>, and <code>estimate_truncation()</code>. By @seabbs in #315.</li>
<li>Add basic snapshot tests for <code>adjust_infection_to_report</code>. By @seabbs in #316.</li>
<li>Update to use <code>rstantools</code> to manage compiler flags.</li>
<li>Update the Dockerfile to work better with vscode.</li>
</ul>
Other changes
<ul>
<li>Updated the classification of growth to use stable rather than unsure when Rt is approximately 1. By @seabbs.</li>
<li>The default parallisation has been changed to <code>future::multisession()</code> from <code>future::multiprocess()</code> as the latter is being depreciated in the <code>future</code> package. By @seabbs and @sbfnk.</li>
<li>Ensure the seeding time is at least the maximum generation time (@sbfnk).</li>
</ul>
Deprecated features
<ul>
<li><code>simulate_cases()</code> and <code>forecast_infections()</code> have been deprecated and have been removed. These functions depend on <code>EpiSoon</code> which itself is archived and near equivalent functionality is available within <code>EpiNow2</code> and in other packages (@seabbs).</li>
<li>Functions supporting secondary forecasting using <code>forecast_infections()</code> (i.e in `epinow())
have been removed along with the arguments that supported them (@seabbs).</li>
<li><code>global_map()</code>, <code>country_map()</code>, and <code>theme_map()</code> 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 for <code>EpiNow2</code>. If finding useful contacting the
<code>EpiNow2</code> developers (@seabbs).</li>
</ul>
Bug fixes
<ul>
<li>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. </li>
<li>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.</li>
<li>Fixed a bug in <code>simulate_infections</code> and <code>forecast_secondary</code> which meant that a Poisson observation model used for estimation would lead to a error. By @seabbs.</li>
<li>Fixed a bug where <code>use_rt = FALSE</code> did not properly cancel user settings. By @sbfnk.</li>
<li>Fixed a bug in <code>estimate_truncation</code> where phi was not initialised. By @sbfnk.</li>
<li>Fixed a bug where <code>zero_threshold</code> was being ignored and so no post-processing was happening. To maintain backwards compatibility the default has been changed to <code>Inf</code> (i.e. no zero threshold). By @LloydChapman in #285.</li>
</ul>
PRs
<ul>
<li>sort table by hidden numeric columns by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/265">https://github.com/epiforecasts/EpiNow2/pull/265</a></li>
<li>Read summary table in report template by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/266">https://github.com/epiforecasts/EpiNow2/pull/266</a></li>
<li>fixed generation times or distributions by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/276">https://github.com/epiforecasts/EpiNow2/pull/276</a></li>
<li>GP: lengthscale: Use inverse-gamma prior if <code>ls_sd = 0</code> by @hsbadr in <a href="https://github.com/epiforecasts/EpiNow2/pull/257">https://github.com/epiforecasts/EpiNow2/pull/257</a></li>
<li>Update README.Rmd by @pitmonticone in <a href="https://github.com/epiforecasts/EpiNow2/pull/263">https://github.com/epiforecasts/EpiNow2/pull/263</a></li>
<li>Fix a typo in _regional-summary.Rmd by @pitmonticone in <a href="https://github.com/epiforecasts/EpiNow2/pull/278">https://github.com/epiforecasts/EpiNow2/pull/278</a></li>
<li>change deprecated future::multiprocess -> multicore by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/289">https://github.com/epiforecasts/EpiNow2/pull/289</a></li>
<li>ensure seeding_time is at least max_gt by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/275">https://github.com/epiforecasts/EpiNow2/pull/275</a></li>
<li>ensure correct parameters if <code>use_rt=FALSE</code> by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/274">https://github.com/epiforecasts/EpiNow2/pull/274</a></li>
<li>initialise phi in <code>estimate_truncation</code> by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/300">https://github.com/epiforecasts/EpiNow2/pull/300</a></li>
<li>fix rt = NULL case by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/302">https://github.com/epiforecasts/EpiNow2/pull/302</a></li>
<li>deal with zeroes in <code>estimate_truncation</code> by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/301">https://github.com/epiforecasts/EpiNow2/pull/301</a></li>
<li>only call truncate if truncation is modelled by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/304">https://github.com/epiforecasts/EpiNow2/pull/304</a></li>
<li>don't pass R to update_Rt by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/303">https://github.com/epiforecasts/EpiNow2/pull/303</a></li>
<li>fix CRAN issues by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/309">https://github.com/epiforecasts/EpiNow2/pull/309</a></li>
<li>fix estimate_secondary example by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/314">https://github.com/epiforecasts/EpiNow2/pull/314</a></li>
<li>Add option for filtering leading zeros and correct zero_threshold by @LloydChapman in <a href="https://github.com/epiforecasts/EpiNow2/pull/285">https://github.com/epiforecasts/EpiNow2/pull/285</a></li>
<li>Fixed a few typos by @pitmonticone in <a href="https://github.com/epiforecasts/EpiNow2/pull/306">https://github.com/epiforecasts/EpiNow2/pull/306</a></li>
<li>Add estimate_secondarry and estimate_truncation simple tests by @seabbs in <a href="https://github.com/epiforecasts/EpiNow2/pull/315">https://github.com/epiforecasts/EpiNow2/pull/315</a></li>
<li>Add tests adjust to report by @seabbs in <a href="https://github.com/epiforecasts/EpiNow2/pull/316">https://github.com/epiforecasts/EpiNow2/pull/316</a></li>
<li>Add plot arg to regional_summary by @seabbs in <a href="https://github.com/epiforecasts/EpiNow2/pull/319">https://github.com/epiforecasts/EpiNow2/pull/319</a></li>
<li>Optimisations and updates for CRAN check by @seabbs in <a href="https://github.com/epiforecasts/EpiNow2/pull/320">https://github.com/epiforecasts/EpiNow2/pull/320</a></li>
<li>Add skeleton for documentation by @seabbs in <a href="https://github.com/epiforecasts/EpiNow2/pull/321">https://github.com/epiforecasts/EpiNow2/pull/321</a></li>
<li>Final changes for 1.3.3 by @seabbs in <a href="https://github.com/epiforecasts/EpiNow2/pull/322">https://github.com/epiforecasts/EpiNow2/pull/322</a></li>
<li>fix typo by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/323">https://github.com/epiforecasts/EpiNow2/pull/323</a></li>
<li>update in progress message for docs by @seabbs in <a href="https://github.com/epiforecasts/EpiNow2/pull/324">https://github.com/epiforecasts/EpiNow2/pull/324</a></li>
<li>spell check by @seabbs in <a href="https://github.com/epiforecasts/EpiNow2/pull/325">https://github.com/epiforecasts/EpiNow2/pull/325</a></li>
<li>fix typo by @sbfnk in <a href="https://github.com/epiforecasts/EpiNow2/pull/326">https://github.com/epiforecasts/EpiNow2/pull/326</a></li>
<li>revert dev version by @seabbs in <a href="https://github.com/epiforecasts/EpiNow2/pull/327">https://github.com/epiforecasts/EpiNow2/pull/327</a></li>
<li>update rendered README by @seabbs in <a href="https://github.com/epiforecasts/EpiNow2/pull/328">https://github.com/epiforecasts/EpiNow2/pull/328</a></li>
<li>Develop by @seabbs in <a href="https://github.com/epiforecasts/EpiNow2/pull/329">https://github.com/epiforecasts/EpiNow2/pull/329</a></li>
</ul>
New Contributors
<ul>
<li>@LloydChapman made their first contribution in <a href="https://github.com/epiforecasts/EpiNow2/pull/285">https://github.com/epiforecasts/EpiNow2/pull/285</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/epiforecasts/EpiNow2/compare/1.3.3...v1.3.3">https://github.com/epiforecasts/EpiNow2/compare/1.3.3...v1.3.3</a></p>
epiforecasts/scoringutils: 1.0.0
Major update to the package and most package functions with lots of breaking changes.
Feature updates
new and updated Readme and vignette
the proposed scoring workflow was reworked. Functions were changed so they
can easily be piped and have simplified arguments and outputs.
new functions and function changes
the function eval_forecasts() was replaced by a function score() with a
much reduced set of function arguments.
Functionality to summarise scores and to add relative skill scores was moved
to a function summarise_scores()
new function check_forecasts() to analyse input data before scoring
new function correlation() to compute correlations between different metrics
new function add_coverage() to add coverage for specific central prediction
intervals
new function avail_forecasts() allows to visualise the number of available
forecasts
new function find_duplicates() to find duplicate forecasts which cause an
error
all plotting functions were renamed to begin with plot_. Arguments were
simplified
the function pit() now works based on data.frames. The old pit function
was renamed to pit_sample(). PIT p-values were removed entirely.
the function plot_pit() now works directly with input as produced by pit()
many data-handling functions were removed and input types for score() were
restricted to sample-based, quantile-based or binary forecasts.
the function brier_score() now returns all brier scores, rather than taking
the mean before returning an output.
crps, dss and logs were renamed to crps_sample(), dss_sample(), and
logs_sample()
Bug fixes
Testing was expanded
minor bugs were fixed, for example a bug in the sample_to_quantile function
(https://github.com/epiforecasts/scoringutils/pull/223)
package data updated
package data is now based on forecasts submitted to the European Forecast Hub
(https://covid19forecasthub.eu/).
all example data files were renamed to begin with example_
a new data set, summary_metrics was included that contains a summary of the
metrics implemented in scoringutils
Other breaking changes
The 'sharpness' component of the weighted interval score was renamed to
dispersion. This was done to make it more clear what the component represents
and to maintain consistency with what is used in other places
epiforecasts/ons_severity_estimates
This uses estimates of infection incidence from the EpiForecasts Rt pipeline combined with PCR positivity curves and estimates of positivity prevalence from the ONS Community Infection Survey to estimates changes over time in: reporting rate of infections, infection-hospitalisation ratio, and infection-fatality ratio. A version of this plot appears in the supplementary material of Vöhringer et al's Genomic reconstruction of the SARS-CoV-2 epidemic in England
epiforecasts/covid.german.forecasts
This repository holds the data and analysis scripts used for the paper "Comparing human and model-based forecasts of COVID-19 in Germany and Poland". It is also still used to to create weekly forecast submissions from the epiforecasts team at the London School of Hygiene & Tropical Medicine to the German and Polish Forecast Hub
- …
