Releases: epiverse-trace/cfr
cfr 0.1.1
Maintainer is changing to @adamkucharski (#143).
Major changes
-
The output column names
severity_mean
andascertainment_mean
have been corrected toseverity_estimate
andascertainment_estimate
. This may break any workflows that rely on the previous column names (#146). -
This version of cfr includes changes to the severity estimation algorithms used in calculating a static severity measure, and may lead to small changes to some CFR values calculated using v0.1.0 (#129).
Functions
-
cfr_static()
:-
Has more informative checks on intermediate values passed to
.estimate_severity()
. -
Prints a message when CFR value cannot be determined or are unreliable.
-
-
cfr_rolling()
:-
Prints a message explaining that this is a convenience function.
-
Has improved input checking.
-
Uses new
.estimate_severity()
functionality based on outbreak size and initial expectation of CFR (#129). -
Prints a message when some rolling CFR values cannot be determined or are unreliable.
-
-
.estimate_severity()
:-
Renamed with
.
prefix to indicate internal function. -
Added parameter
p_mid
for initial severity estimate, which is used to determine the likelihood approximation method. -
Selects from among Binomial, Poisson, and Normal approximation of the likelihood depending on the outbreak size and
p_mid
using the function.select_fun_likelihood()
; prints a message with the selected method (#129). -
Lowest possible severity estimate is reduced to
$10^{-4}$ . -
Severity estimates and confidence intervals stored as named vectors rather than a
<data.frame>
.
-
-
.select_func_likelihood()
: Internal function added that chooses likelihood approximation function based on outbreak size andp_mid
.-
Binomial approximation used for small outbreaks with cumulative cases lower than the Poisson threshold.
-
Poisson approximation used for outbreaks above the Poisson threshold and with
p_mid
< 0.05. -
Normal approximation used for outbreaks above the Poisson threshold and with
p_mid
> 0.05.
-
-
test_fn_req_args()
is updated to useReduce(f = "+")
andMap()
rather thansum(mapply())
.
Documentation
-
Added package level documentation.
-
Updated Readme with lifecycle (stable) and RepoStatus (Active) badges (#113), added DPG badge (#127), and updated the related projects section; corrected figure labelling (#114).
-
Updated
_pkgdown.yaml
with a manual Bootstrap version (#136) reference sections, added a software permissions vignette (#125), and enabled development mode (#143). -
Updated
WORDLIST
. -
Updated all function documentation files (#134).
-
Added section in distributions vignette on when it is acceptable to use continuous rather than discrete distributions.
-
Corrected explanation of
estimate_outcomes()
in static severity vignette and added explanations of profile likelihood generation methods used in all severity vignettes (#143). -
Corrected equations in vignettes (#133) and removed
.estimate_severity()
from vignettes (#132).
Tests
-
All snapshots are updated with severity values from new likelihood functions (#129).
-
Added session global state checker script and setup options script (#119).
-
All tests are updated to reflect that functions will sometimes throw informative messages.
-
Tests using incidence2 suppress warnings on missing values (added in incidence2 v2.3.0) as filling missing values is the subject of the test for
prepare_data.incidence2()
(#143).
Package
-
Added or updated GitHub Actions workflows for dependency changes, linting, updating the citation file, and updating the license year (#119, #137, #142).
-
Updated other GHA workflows and infrastructure files to match the latest versions on
epiverse-trace/packagetemplate
(#119). -
Normalised
DESCRIPTION
file. -
Added
tools/check.env
fromepiverse-trace/packagetemplate
to suppress specific checks on package size, Rd cross references, GNU Make requirement, and non-ASCII strings (#142).
cfr 0.1.0
Initial CRAN submission of cfr, an R package to estimate the severity of a disease and ascertainment of cases while correcting for delays in outcomes of reported cases being known.
This release includes:
- Functions for the overall severity of an outbreak, the overall severity of an outbreak estimated with an expanding time series of data, and the time-varying severity of an outbreak,
- A function to estimate the number of outcomes to be expected from a given number of cases assuming a user-specified distribution of delays between cases and outcomes being known,
- A function to estimate the overall (static) ascertainment of cases in an outbreak by comparing the relevant severity measures against a user-specified baseline severity,
- A data preparation generic with an S3 method for the
<incidence2>
class from the incidence2 package, - Example daily case and death data from the 1976 Ebola Virus Disease outbreak as reported in Camacho et al. (2014). https://doi.org/10.1016/j.epidem.2014.09.003,
- Example daily case and death data from the Covid-19 pandemic over the range 2020-01-01 to 2022-12-31 from the 19 countries with over 100,00 deaths over this period, as taken from the covidregionaldata package which is no longer on CRAN,
- Vignettes describing how to get started with severity estimation, and more detailed workflows on different kinds of severity estimation,
- A vignette on working with data from the incidence2 package, and a vignette on working with delay distributions,
- 100% code coverage,
- Workflows to render the vignettes and README as a website.
Correction
cfr v0.1.0 only includes functionality for static ascertainment calculations. The functionality for time-varying ascertainment is expected to be included in future versions, and an older implementation was removed just prior to release. The news section for cfr v0.1.0 has been updated to reflect this.