This repository stores the code used in ern
, an R package to estimate
the effective reproduction number (
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.
To install the latest version of this package:
devtools::install_github('phac-nml-phrsd/ern')
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
.
- For users who are only unable to install the latest version of
JAGS
, we recommend downgrading to an R version that is less than 4.2. More details can be found here - For users who are having issues installing or running
JAGS
orrjags
, we recommend consulting theJAGS
discussion board.
To use ern
to estimate
vignette("est-rt", package = "ern")
To learn more about how default distribution parameters were estimated
in ern
:
vignette("distributions", package = "ern")
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},
#> }
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.
- do a “check” using the
R-devel
version (link). Note: you also need the latestRtools
associated with this version (download here) - resolve all errors, warnings and notes. There might be false positives; communicate with CRAN in that case.
- build a “Source Package”
- verify the package compiles with no error under Mac OS and Windows
- Submit to CRAN