The <epiparameter> format() and print() methods now show
Extrinsic: TRUE for extrinsic parameters, such as the extrinsic incubation
period of a vector-borne disease. It is not shown for intrinsic parameters,
so output is unchanged for all other entries (#363).
The documentation of the extrinsic argument in create_metadata() is
updated to describe it as a descriptor of whether the parameter is for the
vector or the host. The previous wording referred to linking intrinsic and
extrinsic entries, which described the <vb_epidist> class removed in
v0.3.0 (#363).
.grepi_to_epiparameter() now converts grEPI records that report a range but
no point value, which were previously skipped. The range is stored as the
reported_interval of the summary statistics, which is kept as data only and
not used for inference. As a reported interval does not record what it describes,
the epiParameter_Estimate_Value_Type is added to the notes when it is
Mean, Median or Standard deviation (SD). Records with neither a point
value nor a complete range are still skipped (#521).
.grepi_to_epiparameter() now applies the grEPI *_IsInverseValue flags.
grEPI stores some values as the reciprocal of the quantity they describe
(e.g. a rate for a delay) and flags them as inverse values, which were
previously converted as-is. Flagged point values, range bounds and
confidence interval limits are now inverted (1 / value) and range bounds are
ordered, as inverting reverses their order. The estimate_unit is not
adjusted for inverted values (#519).
Update .grepi_to_epiparameter() for the removal of the
epiParameter_Estimate_IsPoint property from the EpiParameterEstimates
endpoint in grEPI v3.0.7. A record without distribution parameters is now
treated as a point estimate when epiParameter_Estimate_Point_Value is
present, rather than when epiParameter_Estimate_IsPoint is TRUE. (#517)
Update .read_grepi() and .grepi_to_epiparameter() for the grEPI v3.0.6
property renames on the EpiParameterEstimates endpoint
(epiParameter_Estimate_Type -> parameter_type,
epiParameter_Estimate_Subtype -> parameter_subtype,
epiParameter_EventFrom -> delay_event_start,
epiParameter_EventTo -> delay_event_end,
epiParameter_Estimate_Unit -> estimate_unit,
epiParameter_Distribution_Type -> distribution_type,
epi_Parameter_Method_Inference -> inference_method) (#498).
Fix two further .grepi_to_epiparameter() parsing failures found while
testing the above against grEPI UAT. Neither is caused by v3.0.6; both
are pre-existing API behaviour that predates it and were only surfaced
by this round of testing:
epi_Parameter_Population_Sample_Size sometimes returns the sentinel
string "Unspecified" instead of a number, which coerces the whole
response column to character on ingestion and broke parsing for the
majority of records, not just the ones carrying the sentinel. The
value is now coerced to numeric, with non-numeric text treated as
unspecified (NA).epi_Parameter_Method_Inference_DataIsCensored/DataIsTruncated have
been split into _Left/_Right/_Interval fields, so the old
(removed) field names always read as NULL. censored is now TRUE
if any of the three censoring flags is TRUE; right_truncated now
reads ..._DataIsTruncated_Right directly (left-truncation has no
equivalent slot in create_method_assess()).Update .read_grepi() and .grepi_to_epiparameter() for the grEPI v3.0.4
property renames on the EpiParameterEstimates endpoint
(disease_Name_Preferred -> disease,
pathogen_Species_Name_preferred -> pathogen_species) (#495).
The <multi_epiparameter> print() method now adds a message to the footer
when it contains multiple estimates of the same epidemiological parameter
for the same disease from the same study (e.g. different distributions fit
to the same data), which otherwise look like duplicate entries when printed.
The message names the study when there is one, or gives the number of
studies, and points to $notes, which usually describes how the estimates
differ. Studies are identified by DOI, or by citation when there is no DOI
(#42, #445).
Code is formatted consistently in messages, warnings and errors: function
names and arguments are in backticks (e.g. `get_citation()`) and
classes in angle brackets (e.g. <epiparameter>).
The translation template (po/R-epiparameter.pot) is updated to include the
new and renamed translatable strings.
.grepi_to_epiparameter() now reads the article DOI from article_Unique_Identifier (gated on article_Unique_Identifier_Type) instead of the removed article_DOI field, to match the grEPI v3.0.1 API restructure (#490)..read_grepi() gains a base_url argument (defaulting to the production grEPI endpoint) so tests and manual checks can target the grEPI UAT environment (#490).A patch release resolving issues flagged by CRAN checks.
extract-bias.Rmd vignette is converted to an article, and therefore, it is no longer available on CRAN and can be read on the package website (#437).extract_param() unit tests for the Weibull distribution are skipped on CRAN due to failing the M1 Mac CRAN check. These tests pass locally and on GitHub actions, so unchanged but skipped on CRAN (#437).The fourth minor release of the {epiparameter} focuses on splitting the code and data, with the data being moved into a separate R package: {epiparameterDB}. There are also some minor additional improvements focusing on printing and plotting.
parameters.json) has been removed from the {epiparameter} package and moved to the {epiparameterDB} R package which is taken on as a dependency. The {epiparameter} package is licensed solely as MIT with dual licensing with CC0 removed (#415).data_dictionary.json) and JSON validation workflow (validate-json.yaml) have been removed from the package (#415).epiparameter_db() (#417).print() and format() methods for the <epiparameter> class have been improved to show the units of parameter estimates, as well as summary statistics, if available, for unparameterised <epiparameter> objects (#419).on.exit() is no longer called in plotting functions to allow user-specified graphical parameters to not be overwritten (#420).plot() method for the <multi_epiparameter> class is added. This enables a list of <epiparameter> objects with continuous distributions to be compared on a single plot (#425).lines() method for the <epiparameter> class is added (#425).is_continuous() causing it to incorrectly returning FALSE for <epiparameter> objects with normal distributions is fixed (#422).The third minor release of the {epiparameter} R package contains a range of updates and improvements to the package. The principal aim of this release is to simplify, clarify and enhance the classes and class methods when working with epidemiological parameters in R.
The are a large number of breaking changes in this release, primarily functions and function arguments being renamed or restructured, see the Breaking changes section for an overview.
c() method has been added for <epiparameter> and <multi_epiparameter> objects (#368).aggregate() method has been added for <multi_epiparameter> to enable consensus distributions to be built utilising the mixture distribution class from {distributional} (#388).convert_summary_stats_to_params() can now convert from median and dispersion for a lognormal distribution (#378).data_dictionary.json has been enhanced to improve validation of the library of epidemiological parameters (parameters.json) (#379).<epiparameter> S3 methods has been added to the design_principles.Rmd vignette (#383).data_from_epireview.Rmd article has been improved and updated with new changes from {epireview} (@CarmenTamayo & @cm401 & @kellymccain28, #305 & #373).parameters.json) and to the $metadata element in <epiparameter> objects. The create_metadata() function now has a units argument to construct metadata lists (#391).database.Rmd vignette by adding a short citation to the reference column (@jamesmbaazam, #348).family() method for <epiparameter> has been improved to allow access to distribution names for transformed (e.g. mixture and truncated distributions) and untransformed (e.g. gamma and lognormal) distributions with a new argument base_dist and a new internal function .distributional_family() (#398).as_epiparameter() can now work with the SARS parameters from {epireview} (#407).<epidist> class has been renamed <epiparameter> to avoid confusion with the similar R package {epidist} (#360).epidist in their names have been renamed to use epiparameter due to the renaming of the class (#360).epiparameter() and new_epiparameter() functions (previously epidist() and new_epidist()) have been updated to collapse the prob_dist, prob_dist_params, discretise and truncation arguments into prob_distribution, which accepts the output of create_prob_distribution() (#381).epi_dist argument has been renamed epi_name. This is to clarify that {epiparameter} can work with epidemiological parameters that take a variety of forms (e.g. point estimates, ranges, probability distributions, etc.) (#390).<vb_epidist> class and it's methods have been removed from the package. It was not being used and was increasing the complexity and maintenance load of the package (#359).create_prob_dist() has been renamed to create_prob_distribution() (#381).validate_epiparameter() (previously validate_epidist()) has been renamed assert_epiparameter(), and test_epiparameter() has been added, with the aim to harmonise design with {contactmatrix} and the messages and errors have been improved (#366 & #402).|>) in dependencies, and the R-CMD-check workflow on GitHub actions now explicitly runs on the minimum version of R stated in the DESCRIPTION (#384 & #405).<epiparameter> (when auto_calc_params = TRUE) (#381).The second release of the {epiparameter} R package focuses on interoperability with the {epireview} R package. Several functions have been refactored and enhanced.
This release benefited from feedback from the participants of an EpiParameter Community workshop hosted by the World Health Organisation.
The as_epidist() S3 generic has been added to the package for the coercion of other R objects into <epidist> objects. The as_epidist.data.frame() method is added, as well as the internal functions is_epireview() which determines if a <data.frame> is from {epireview}, and epireview_to_epidist() performs the conversion (#298, #334 & #335)
The epireview_core_cols.rda data is added to the package. This is used to determine whether the input to as_epidist.data.frame() is a parameter table from {epireview} as these objects do not have a recognisable class attribute (#298).
A new website only vignette (i.e. article) data_from_epireview.Rmd is added that explains how to use as_epidist() with data from {epireview} (#298 & #335).
A new vignette database.Rmd is added to the package to provide a web interface to the {epiparameter} library of epidemiological parameters. Contributed by @sbfnk (#311).
The plotting method for <epidist> objects (plot.epidist()) has been improved to better differentiate continuous from discrete or discretised distributions (#315).
epidist_db(..., single_epidist = TRUE) now prioritises parameter entries that account for right truncation (#323).
create_epidist_prob_dist() (previously named create_prob_dist()) is now exported and enables more control of discretisation settings by allowing arguments to be passed to distcrete::distcrete() via ... (#324).
The <multi_epidist> print method (print.multi_epidist()) has been improved to provides object information in the print header, the first few elements of the list or all elements if list is short, and some extra links and advice in the print footer. The design of the print method follows the design pattern of {pillar} (#326).
<epidist> objects and functions that work with <epidist> objects now work with exponential distributions (#333).
The package now has an explicit data license: CC0 in the LICENSE file.
list_distributions() has been replaced by parameter_tbl() which enhances the printing by leveraging {pillar} (#321).
The <vb_epidist> plotting method (plot.vb_epidist()) has been removed from the package. This provided minimal functionality and was unnecessarily complicating the function signature of plot.epidist() (#315).
Initial release of the {epiparameter} R package. {epiparameter} provides:
A library of epidemiological parameters extracted from the literature for a range of diseases.
Functions and classes (with class methods) to work with epidemiological parameters and distributions.
sysdata.rda, as epiparameter::multi_epidist) or as internal data (inst/extdata/parameters.json).epidist_db() function loads epidemiological parameters from the library.convert_params_to_summary_stats() & convert_summary_stats_to_params(), and extract_param()).<epidist>. This class has S3 methods to aid users easily work with these data structures. These include printing, plotting, and distribution functions for PDF/PMF, CDF, random number generation and distribution quantiles. The <epidist> class has a constructor function, a validator function, accessors (get_*()), checkers (is_*()). There is also a <vb_epidist> S3 class for vector-borne parameters, and an internal <multi_epidist> class for improved printing of lists of <epidist> objects.list_distributions() is a helper function to provide information from a list of <epidist> objects in tabular form. calc_disc_dist_quantile() calculates the quantiles of a probability distribution based on the vector of probabilities and time data.epiparameter.Rmd), one as an tutorial on converting and extracting parameters (extract_convert.Rmd), one on the protocol used to collect entries for the library of epidemiological parameters (data_protocol.Rmd), a design vignette (design_principles.Rmd), and a supplementary vignette which quantifies the bias from using the parameter extraction (extract_param()) from {epiparameter} (extract-bias.Rmd).