ern

codecov Lifecycle: experimental

This repository stores the code used in ern, an R package to estimate the effective reproduction number (\(R_t\)) of pathogens using clinical or wastewater data.

This package is developed at the Public Health Agency of Canada / National Microbiology Laboratory. Please note this software is provivded “as is”, without warranty of any kind; see the license.

Installation

To install the latest version of this package:

devtools::install_github('phac-nml-phrsd/ern')

Note on JAGS

rjags is a dependency for ern, specifically for Rt calculations performed on clinical testing data using the “renewal” method for inference of the daily incidence from aggregated clinical data. If you are only using the “linear” method, or performing calculations using wastewater data, you do not need to worry about installing rjags and can skip this section.

rjags is the R interface for the JAGS Bayesian modelling library. Installation of JAGS is required and the latest version can be found here. It is recommended that you are using the latest version of R and JAGS for optimal usage of ern.

Vignettes

To use ern to estimate \(R_t\):

vignette("est-rt", package = "ern")

To learn more about how default distribution parameters were estimated in ern:

vignette("distributions", package = "ern")

Citation

You can cite ern with:

citation('ern')
#> 
#> To cite package 'ern' in publications use:
#> 
#>   Champredon D, Papst I, Yusuf W (2023). _ern: An R Package to Estimate
#>   the Effective Reproduction Number Using Clinical and Wastewater
#>   Surveillance Data_. National Microbiology Laboratory, Public Health
#>   Agency of Canada, Government of Canada.
#>   <https://github.com/phac-nml-phrsd/ern>.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {ern: An R Package to Estimate the Effective Reproduction Number Using Clinical and Wastewater Surveillance Data},
#>     author = {David Champredon and Irena Papst and Warsame Yusuf},
#>     organization = {National Microbiology Laboratory, Public Health Agency of Canada, Government of Canada},
#>     year = {2023},
#>     url = {https://github.com/phac-nml-phrsd/ern},
#>   }

For developers

Before creating a pull request into main, please be sure to pull main in to your development branch, resolve any conflicts, and then run devtools::check(args = c('--as-cran')) on your development branch. Ensure that all checks pass without issue.

For CRAN udpates