Learn R Programming

Scope

i2extras adds additional functionality to the incidence2 package.

What does it do?

The main features of the package include:

  • fit_curve() and growth_rate(): fit a trend (poisson / negative binomial) to an incidence2 object and calculate the associated growth rate.

  • add_rolling_average(): add a rolling average to an incidence2 object.

  • bootstrap(): generates a bootstrapped incidence2 object by re-sampling, with replacement, the original dates of events.

  • find_peak(): locates the peak time of the epicurve.

  • estimate_peak(): uses bootstrap to estimate the peak time (and related confidence interval) of a partially observed outbreak.

Installing the package

You can install the released version of {i2extras} from CRAN with:

install.packages("i2extras")

The development version of {i2extras} can be installed from GitHub with:

remotes::install_github("reconverse/i2extras", build_vignettes = TRUE)

Resources

Vignettes

An overview of i2extras is provided in the included vignettes:

  • vignette("peak_estimation", package = "i2extras")

  • vignette("fitting_epicurves", package = "i2extras")

Getting help online

Bug reports and feature requests should be posted on github using the issue system. All other questions should be posted on the RECON slack channel see https://www.repidemicsconsortium.org/forum/ for details on how to join.

Copy Link

Version

Install

install.packages('i2extras')

Monthly Downloads

82

Version

0.2.1

License

MIT + file LICENSE

Maintainer

Tim Taylor

Last Published

March 17th, 2023

Functions in i2extras (0.2.1)

growth_rate

Calculate growth/decay rate
add_rolling_average

Add a rolling average
plot.incidence2_fit

Plot a fitted epicurve
fit_curve

Fit an epi curve
find_peak

Find the peak date of an incidence curve
unnest

Objects exported from other packages
flag_low_counts

Flag low counts and set them to NAs
estimate_peak

Estimate the peak date of an incidence curve
bootstrap

Bootstrap incidence time series
is_okerr

Error handling for incidence2_fit objects
i2extras-defunct

Defunct functions in package i2extras