Package: ggoutbreak 0.6.1

Robert Challen

ggoutbreak: Estimate Incidence, Proportions and Exponential Growth Rates

Simple statistical models and visualisations for calculating the incidence, proportion, exponential growth rate, and reproduction number of infectious disease case time series. This toolkit was largely developed during the COVID-19 pandemic.

Authors:Robert Challen [aut, cre, cph]

ggoutbreak_0.6.1.tar.gz
ggoutbreak_0.6.1.zip(r-4.7)ggoutbreak_0.6.1.zip(r-4.6)ggoutbreak_0.6.1.zip(r-4.5)
ggoutbreak_0.6.1.tgz(r-4.6-any)ggoutbreak_0.6.1.tgz(r-4.5-any)
ggoutbreak_0.6.1.tar.gz(r-4.7-any)ggoutbreak_0.6.1.tar.gz(r-4.6-any)
ggoutbreak_0.6.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
ggoutbreak/json (API)

# Install 'ggoutbreak' in R:
install.packages('ggoutbreak', repos = c('https://ai4ci.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ai4ci/ggoutbreak/issues

Pkgdown/docs site:https://ai4ci.github.io

On CRAN:

Conda:

5.58 score 3 stars 21 scripts 163 exports 83 dependencies

Last updated from:a6a6232991 (on 0.6.1). Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK282
source / vignettesOK490
linux-release-x86_64OK294
macos-release-arm64OK160
macos-oldrel-arm64OK179
windows-develOK261
windows-releaseOK287
windows-oldrelOK303
wasm-releaseOK166

Exports:.ts_evaluate%>%as.time_periodbreaks_log1pcfg_beta_prob_rngcfg_gamma_ip_fncfg_ip_sampler_rngcfg_linear_fncfg_step_fncfg_transition_fncfg_weekly_gamma_rngcfg_weekly_ip_fncfg_weekly_proportion_rngcut_datedate_seqdate_to_timedbeta2dcgammadgamma2dlnorm2dlogitnormdlogitnorm2dnbinom2dnulldoubling_timedwedgeexample_bpmexample_delayed_observationexample_du_serialexample_england_covid_by_ageexample_ganyani_ipexample_ipexample_poisson_age_stratifiedexample_poisson_growth_rateexample_poisson_locfitexample_poisson_rtexample_poisson_rt_2classexample_poisson_rt_smoothexample_proportion_age_stratifiedexample_serialfdmyformat_ipgam_delayed_reportinggam_knotsgam_nb_model_fngam_poisson_model_fngeom_eventsgrowth_rate_from_incidencegrowth_rate_from_prevalencegrowth_rate_from_proportioninfer_populationinfer_prevalenceinfer_rate_ratioinfer_risk_ratiointeger_breaksinv_wallinga_lipsitchis.Dateis.time_periodlinelistlogit_transmake_empirical_ipmake_fixed_ipmake_gamma_ipmake_posterior_ipmake_resampled_ipmax_datemin_datemultinomial_nnet_modelnew_time_periodnormalise_countnormalise_incidenceomega_matrixpbeta2pcgammapgamma2plnorm2plogitnormplogitnorm2plot_casesplot_countsplot_growth_phaseplot_growth_rateplot_incidenceplot_ipplot_multinomialplot_prevalenceplot_proportionplot_proportions_dataplot_rtpnbinom2pnullpoisson_gam_modelpoisson_glm_modelpoisson_locfit_modelproportion_glm_modelproportion_locfit_modelpwedgeqbeta2qcgammaqgamma2qlnorm2qlogitnormqlogitnorm2qnbinom2qnullquantify_lagqwedgerbernrbeta2rcategoricalrcgammardiscgammareband_discreterescale_modelrexpgrowthrexpgrowthI0rgamma2rlnorm2rlogitnormrlogitnorm2rnbinom2rnullrt_corirt_epiestimrt_from_growth_ratert_from_incidencert_from_renewalrt_incidence_reference_implementationrt_incidence_timeseries_implementationrwedgescale_x_log1pscale_x_logitscale_y_log1pscale_y_logitscore_estimateset_default_startset_default_unitset_defaultssim_apply_ascertainmentsim_apply_delaysim_apply_delay.count_datasim_apply_delay.linelistsim_branching_processsim_convolutionsim_delaysim_delayed_observationsim_eventssim_geom_functionsim_multinomialsim_poisson_modelsim_poisson_Rt_modelsim_seir_modelsim_summarise_linelistsim_test_datasummarise_iptime_aggregatetime_summarisetime_to_datetimeseriestype.time_periodvcov_from_residualswallinga_lipsitchwith_defaults

Dependencies:aweekbrewcallrclicoarseDataToolscodacommonmarkcpp11crayondescdeSolvedplyrEpiEstimevaluatefarverfitdistrplusforcatsfsgenericsggplot2gluegridExtragtablehighrincidenceinterfacerisobandknitrlabelinglatticelifecyclelobstrlocfitlubridatemagrittrMASSMatrixMatrixModelsmcmcMCMCpackmgcvmomentsnlmennetorthopolynomPDQutilspillarpkgbuildpkgconfigpkgloadplyrpolynomprettyunitsprocessxpspurrrquantregR6RColorBrewerRcppreshape2rlangroxygen2rprojrootS7scalessignalSparseMstringistringrsurvivaltibbletidyrtidyselecttimechangeukc19utf8vctrsviridisLitewithrxfunxml2yaml

Data wrangling and working with ggoutbreak

Rendered fromtime-periods.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2025-12-10
Started: 2023-12-24

England COVID-19 cases

Rendered fromcovid-timeseries.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2025-12-10
Started: 2023-12-24

Estimating the reproduction number from modelled incidence

Rendered fromrt-from-incidence.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2025-12-10
Started: 2024-01-05

Estimating the reproduction number from right censored data

Rendered fromright-censoring.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2025-12-10
Started: 2025-08-21

Estimating the reproduction number from weekly data

Rendered fromweekly-incidence.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2025-12-10
Started: 2025-08-15

Getting started with ggoutbreak

Rendered fromggoutbreak.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2025-08-16
Started: 2025-07-18

Infectivity profile discretisation

Rendered frominfectivity-profile-discretisation.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2025-12-10
Started: 2025-02-03

Multinomial proportions models for genomic variants

Rendered fromvariant-proportions.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2025-12-10
Started: 2022-10-23

Population comparisons and incidence

Rendered fromincidence-trends.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2025-12-10
Started: 2023-12-24

Sampling the infectivity profile from published serial interval estimates

Rendered fromsampling-serial-interval.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2025-12-10
Started: 2025-02-03

Simulation tests for growth rate estimators

Rendered fromestimators-example.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2025-12-10
Started: 2022-10-23

Simulations and test harnesses

Rendered fromsimulation-test-models.Rmdusingknitr::rmarkdownon May 10 2026.

Last update: 2025-12-10
Started: 2025-02-03

Readme and manuals

Help Manual

Help pageTopics
Time period S3 class methodsas.time_period as.time_period.Date as.time_period.grates_epiweek as.time_period.grates_isoweek as.time_period.grates_period as.time_period.numeric as.time_period.time_period date_to_time is.time_period seq.time_period time_to_date
A scales breaks generator for log1p scalesbreaks_log1p
Generate a random probability based on features of the simulationcfg_beta_prob_rng
Get a IP generating function from time varying mean and SD of a gamma functioncfg_gamma_ip_fn
Randomly sample from an empirical distributioncfg_ip_sampler_rng
Linear function from dataframecfg_linear_fn
Step function from dataframecfg_step_fn
Sample from a multinomial transition matrixcfg_transition_fn
Weekly delay function with day of week effectcfg_weekly_gamma_rng
Weekly convolution distribution functioncfg_weekly_ip_fn
Random probability function with day of week effectcfg_weekly_proportion_rng
Places a set of dates within a regular time seriescut_date
Create the full sequence of values in a vectordate_seq
Expand a date vector to the full range of possible datesdate_seq.Date
Create the full sequence of values in a vectordate_seq.numeric
Expand a 'time_period' vector to the full range of possible timesdate_seq.time_period
The Beta Distributiondbeta2
Density: gamma distribution constrained to have mean > sddcgamma
The Gamma Distributiondgamma2
The Log Normal Distributiondlnorm2
Logit-normal distributiondlogitnorm
Logit-normal distributiondlogitnorm2
The Negative Binomial Distributiondnbinom2
Null distributions always returns NAdnull
Doubling time from growth ratedoubling_time
Wedge distributiondwedge
Format date as dmyfdmy
Print a summary of an infectivity profileformat_ip
Delayed GAM reporting model function generatorgam_delayed_reporting
Derive a set of knot points for a GAM from datagam_knots
Default GAM count negative binomial model.gam_nb_model_fn
Default GAM count model.gam_poisson_model_fn
Add time series event markers to a time series plot.geom_events
Estimate growth rate from modelled incidencegrowth_rate_from_incidence
Estimate relative growth rate from estimated prevalencegrowth_rate_from_prevalence
Estimate relative growth rate from modelled proportiongrowth_rate_from_proportion
Infers a daily baseline population for a timeseriesinfer_population
Infer the prevalence of disease from incidence estimates and population size.infer_prevalence
Calculate a risk ratio from incidenceinfer_rate_ratio
Calculate a normalised risk ratio from proportionsinfer_risk_ratio
Strictly integer breaks for continuous scaleinteger_breaks
Calculate a growth rate from a reproduction number and an infectivity profile,inv_wallinga_lipsitch
Check whether vector is a dateis.Date
Extract Parts of a POSIXt or Date Objectjulian.time_period
Label a time periodlabels.time_period
Coerce an object to a 'ggoutbreak' compatible case linelist.linelist
logit scalelogit_trans
Recover a long format infectivity profile from an 'EpiEstim' style matrixmake_empirical_ip
Generate a simple discrete infectivity profile from a gamma distributionmake_fixed_ip
Make an infectivity profile from published datamake_gamma_ip
Make an infectivity profile from posterior samplesmake_posterior_ip
Re-sample an empirical IP distribution direct from datamake_resampled_ip
The maximum of a set of datesmax_date
The minimum of a set of datesmin_date
Extract Parts of a POSIXt or Date Objectmonths.time_period
Multinomial time-series model.multinomial_nnet_model
Calculate a normalised count per capitanormalise_count
Calculate a normalised incidence rate per capitanormalise_incidence
Generate a infectivity profile matrix from a long formatomega_matrix
The Beta Distributionpbeta2
Cumulative probability: gamma distribution constrained to have mean > sdpcgamma
The Gamma Distributionpgamma2
The Log Normal Distributionplnorm2
Logit-normal distributionplogitnorm
Logit-normal distributionplogitnorm2
Plot a line-list of cases as a histogramplot_cases
Plot a raw case count timeseriesplot_counts
Plot an incidence or proportion versus growth phase diagramplot_growth_phase
Growth rate timeseries diagramplot_growth_rate
Plot an incidence timeseriesplot_incidence
Plot an infectivity profileplot_ip
Plot a multinomial proportions modelplot_multinomial
Plot a timeseries of disease prevalenceplot_prevalence
Plot a proportions timeseriesplot_proportion
Plot a raw case count proportion timeseriesplot_proportions_data
Reproduction number timeseries diagramplot_rt
The Negative Binomial Distributionpnbinom2
Null distributions always returns NApnull
GAM poisson time-series modelpoisson_gam_model
Poisson time-series model.poisson_glm_model
Poisson time-series model.poisson_locfit_model
Binomial time-series model.proportion_glm_model
A binomial proportion estimate and associated exponential growth rateproportion_locfit_model
Wedge distributionpwedge
The Beta Distributionqbeta2
Quantile: gamma distribution constrained to have mean > sdqcgamma
The Gamma Distributionqgamma2
The Log Normal Distributionqlnorm2
Logit-normal distributionqlogitnorm
Logit-normal distributionqlogitnorm2
The Negative Binomial Distributionqnbinom2
Null distributions always returns NAqnull
Identify estimate lags in a modelquantify_lag
Extract Parts of a POSIXt or Date Objectquarters.time_period
Wedge distributionqwedge
A random Bernoulli sample as a logical valuerbern
The Beta Distributionrbeta2
Sampling from the multinomial equivalent of the Bernoulli distributionrcategorical
Sampling: gamma distribution constrained to have mean > sdrcgamma
Random count data from a discrete gamma distributionrdiscgamma
Reband any discrete distributionreband_discrete
Rescale a timeseries in the temporal dimensionrescale_model
Randomly sample incident times in an exponentially growing processrexpgrowth
Randomly sample incident times in an exponentially growing process with initial case loadrexpgrowthI0
The Gamma Distributionrgamma2
The Log Normal Distributionrlnorm2
Logit-normal distributionrlogitnorm
Logit-normal distributionrlogitnorm2
The Negative Binomial Distributionrnbinom2
Null distributions always returns NArnull
Reproduction number estimate using the Cori methodrt_cori
'EpiEstim' reproduction number wrapper functionrt_epiestim
Wallinga-Lipsitch reproduction number from growth ratesrt_from_growth_rate
Reproduction number from modelled incidencert_from_incidence
Reproduction number from renewal equation applied to modelled incidence using statistical re-samplingrt_from_renewal
Reference implementation of the Rt from modelled incidence algorithmrt_incidence_reference_implementation
Time series implementation of the Rt from modelled incidence algorithmrt_incidence_timeseries_implementation
Wedge distributionrwedge
A log1p x scalescale_x_log1p
A logit x scalescale_x_logit
A log1p y scalescale_y_log1p
A logit y scalescale_y_logit
Calculate scoring statistics from predictions.score_estimate
Set or reset the default origin and unit for time periodsset_defaults set_default_start set_default_unit with_defaults
Apply a ascertainment bias to the observed case counts.sim_apply_ascertainment
Apply delay distribution to count or linelist datasim_apply_delay
Generate a line list from a branching process model parametrised by reproduction numbersim_branching_process
Apply a time varying probability and convolution to count datasim_convolution
Apply a time-varying probability and delay function to linelist datasim_delay
Apply a right censoring to count data.sim_delayed_observation
Extract the events dataframe from a simulation outputsim_events
The principal input function to a 'ggoutbreak' simulation as a 'ggplot2' layer.sim_geom_function
Generate a multinomial outbreak defined by per class growth rates and a poisson modelsim_multinomial
Generate an outbreak case count series defined by growth rates using a poisson model.sim_poisson_model
Generate an outbreak case count series defined by Reproduction number using a poisson model.sim_poisson_Rt_model
SEIR model with time-varying transmission parametersim_seir_model
Summarise a line listsim_summarise_linelist
Generate a simple time-series of cases based on a growth rate step functionsim_test_data
Generate a single infectivity profile from multiple bootstrapssummarise_ip
Aggregate time series data preserving the time seriestime_aggregate
Summarise data from a line list to a time-series of counts.time_summarise
Coerce an object to a 'ggoutbreak' compatible time series dataframetimeseries timeseries.data.frame timeseries.default timeseries.incidence timeseries.incidence2
Estimate Parametric VCOV Matrix from Residualsvcov_from_residuals
Calculate the reproduction number from a growth rate estimate and an infectivity profilewallinga_lipsitch
Wedge distributionwedge
Extract Parts of a POSIXt or Date Objectweekdays.time_period