Skip to contents

Incidence, Growth Rate and Reproduction Number estimators

doubling_time()
Doubling time from growth rate
gam_delayed_reporting()
Delayed GAM reporting model function generator
gam_knots()
Derive a set of knot points for a GAM from data
gam_nb_model_fn()
Default GAM count negative binomial model.
gam_poisson_model_fn()
Default GAM count model.
growth_rate_from_incidence()
Estimate growth rate from modelled incidence
growth_rate_from_prevalence() experimental
Estimate relative growth rate from estimated prevalence
growth_rate_from_proportion() experimental
Estimate relative growth rate from modelled proportion
infer_population()
Infers a daily baseline population for a timeseries
infer_prevalence() experimental
Infer the prevalence of disease from incidence estimates and population size.
infer_rate_ratio() experimental
Calculate a risk ratio from incidence
infer_risk_ratio() experimental
Calculate a normalised risk ratio from proportions
inv_wallinga_lipsitch()
Calculate a growth rate from a reproduction number and an infectivity profile,
linelist()
Coerce an object to a ggoutbreak compatible case linelist.
multinomial_nnet_model()
Multinomial time-series model.
normalise_count()
Calculate a normalised count per capita
normalise_incidence()
Calculate a normalised incidence rate per capita
poisson_gam_model()
GAM poisson time-series model
poisson_glm_model()
Poisson time-series model.
poisson_locfit_model()
Poisson time-series model.
proportion_glm_model()
Binomial time-series model.
proportion_locfit_model()
A binomial proportion estimate and associated exponential growth rate
rescale_model()
Rescale a timeseries in the temporal dimension
rt_cori()
Reproduction number estimate using the Cori method
rt_epiestim()
EpiEstim reproduction number wrapper function
rt_from_growth_rate()
Wallinga-Lipsitch reproduction number from growth rates
rt_from_incidence()
Reproduction number from modelled incidence
rt_from_renewal()
Reproduction number from renewal equation applied to modelled incidence using statistical re-sampling
rt_incidence_reference_implementation()
Reference implementation of the Rt from modelled incidence algorithm
rt_incidence_timeseries_implementation()
Time series implementation of the Rt from modelled incidence algorithm
timeseries()
Coerce an object to a ggoutbreak compatible time series dataframe
wallinga_lipsitch()
Calculate the reproduction number from a growth rate estimate and an infectivity profile

Delay distributions and Infectivity profiles

format_ip()
Print a summary of an infectivity profile
make_empirical_ip()
Recover a long format infectivity profile from an EpiEstim style matrix
make_fixed_ip()
Generate a simple discrete infectivity profile from a gamma distribution
make_gamma_ip()
Make an infectivity profile from published data
make_posterior_ip()
Make an infectivity profile from posterior samples
make_resampled_ip()
Re-sample an empirical IP distribution direct from data
omega_matrix()
Generate a infectivity profile matrix from a long format
summarise_ip()
Generate a single infectivity profile from multiple bootstraps

Visualisations

breaks_log1p()
A scales breaks generator for log1p scales
geom_events()
Add time series event markers to a time series plot.
integer_breaks()
Strictly integer breaks for continuous scale
logit_trans()
logit scale
plot_cases()
Plot a line-list of cases as a histogram
plot_counts()
Plot a raw case count timeseries
plot_growth_phase()
Plot an incidence or proportion versus growth phase diagram
plot_growth_rate()
Growth rate timeseries diagram
plot_incidence()
Plot an incidence timeseries
plot_ip()
Plot an infectivity profile
plot_multinomial()
Plot a multinomial proportions model
plot_prevalence() experimental
Plot a timeseries of disease prevalence
plot_proportion()
Plot a proportions timeseries
plot_proportions_data()
Plot a raw case count proportion timeseries
plot_rt()
Reproduction number timeseries diagram
scale_x_log1p()
A log1p x scale
scale_x_logit()
A logit x scale
scale_y_log1p()
A log1p y scale
scale_y_logit()
A logit y scale

Time series functions

as.time_period() seq(<time_period>) is.time_period() date_to_time() time_to_date()
Time period S3 class methods
cut_date()
Places a set of dates within a regular time series
date_seq(<Date>)
Expand a date vector to the full range of possible dates
date_seq()
Create the full sequence of values in a vector
date_seq(<numeric>)
Create the full sequence of values in a vector
date_seq(<time_period>)
Expand a time_period vector to the full range of possible times
fdmy()
Format date as dmy
is.Date()
Check whether vector is a date
julian(<time_period>)
Extract Parts of a POSIXt or Date Object
labels(<time_period>)
Label a time period
max_date()
The maximum of a set of dates
min_date()
The minimum of a set of dates
months(<time_period>)
Extract Parts of a POSIXt or Date Object
quarters(<time_period>)
Extract Parts of a POSIXt or Date Object
set_defaults() with_defaults() set_default_start() set_default_unit()
Set or reset the default origin and unit for time periods
time_aggregate()
Aggregate time series data preserving the time series
time_summarise()
Summarise data from a line list to a time-series of counts.
weekdays(<time_period>)
Extract Parts of a POSIXt or Date Object

Simulation and testing functions

cfg_beta_prob_rng()
Generate a random probability based on features of the simulation
cfg_gamma_ip_fn()
Get a IP generating function from time varying mean and SD of a gamma function
cfg_ip_sampler_rng()
Randomly sample from an empirical distribution
cfg_linear_fn()
Linear function from dataframe
cfg_step_fn()
Step function from dataframe
cfg_transition_fn()
Sample from a multinomial transition matrix
cfg_weekly_gamma_rng()
Weekly delay function with day of week effect
cfg_weekly_ip_fn()
Weekly convolution distribution function
cfg_weekly_proportion_rng()
Random probability function with day of week effect
quantify_lag()
Identify estimate lags in a model
score_estimate()
Calculate scoring statistics from predictions.
sim_apply_ascertainment()
Apply a ascertainment bias to the observed case counts.
sim_apply_delay()
Apply delay distribution to count or linelist data
sim_branching_process()
Generate a line list from a branching process model parametrised by reproduction number
sim_convolution()
Apply a time varying probability and convolution to count data
sim_delay()
Apply a time-varying probability and delay function to linelist data
sim_delayed_observation()
Apply a right censoring to count data.
sim_events()
Extract the events dataframe from a simulation output
sim_geom_function()
The principal input function to a ggoutbreak simulation as a ggplot2 layer.
sim_multinomial()
Generate a multinomial outbreak defined by per class growth rates and a poisson model
sim_poisson_Rt_model()
Generate an outbreak case count series defined by Reproduction number using a poisson model.
sim_poisson_model()
Generate an outbreak case count series defined by growth rates using a poisson model.
sim_seir_model()
SEIR model with time-varying transmission parameter
sim_summarise_linelist()
Summarise a line list
sim_test_data()
Generate a simple time-series of cases based on a growth rate step function

Reparameterised statistical distributions

dbeta2()
The Beta Distribution
dcgamma()
Density: gamma distribution constrained to have mean > sd
dgamma2()
The Gamma Distribution
dlnorm2()
The Log Normal Distribution
dlogitnorm()
Logit-normal distribution
dlogitnorm2()
Logit-normal distribution
dnbinom2()
The Negative Binomial Distribution
dnull()
Null distributions always returns NA
dwedge()
Wedge distribution
pbeta2()
The Beta Distribution
pcgamma()
Cumulative probability: gamma distribution constrained to have mean > sd
pgamma2()
The Gamma Distribution
plnorm2()
The Log Normal Distribution
plogitnorm()
Logit-normal distribution
plogitnorm2()
Logit-normal distribution
pnbinom2()
The Negative Binomial Distribution
pnull()
Null distributions always returns NA
pwedge()
Wedge distribution
qbeta2()
The Beta Distribution
qcgamma()
Quantile: gamma distribution constrained to have mean > sd
qgamma2()
The Gamma Distribution
qlnorm2()
The Log Normal Distribution
qlogitnorm()
Logit-normal distribution
qlogitnorm2()
Logit-normal distribution
qnbinom2()
The Negative Binomial Distribution
qnull()
Null distributions always returns NA
qwedge()
Wedge distribution
rbern()
A random Bernoulli sample as a logical value
rbeta2()
The Beta Distribution
rcategorical()
Sampling from the multinomial equivalent of the Bernoulli distribution
rcgamma()
Sampling: gamma distribution constrained to have mean > sd
rdiscgamma()
Random count data from a discrete gamma distribution
rexpgrowth()
Randomly sample incident times in an exponentially growing process
rexpgrowthI0()
Randomly sample incident times in an exponentially growing process with initial case load
rgamma2()
The Gamma Distribution
rlnorm2()
The Log Normal Distribution
rlogitnorm()
Logit-normal distribution
rlogitnorm2()
Logit-normal distribution
rnbinom2()
The Negative Binomial Distribution
rnull()
Null distributions always returns NA
rwedge()
Wedge distribution
wedge
Wedge distribution

Data Documentation

Others

reband_discrete()
Reband any discrete distribution
vcov_from_residuals()
Estimate Parametric VCOV Matrix from Residuals