Skip to contents

Estimation + Reporting

Functions that faciliate end-to-end analysis including imputing cases by infection, estimating Rt and reporting results.

epinow() stable
Real-time Rt Estimation, Forecasting and Reporting
epinow2_cmdstan_model()
Load and compile an EpiNow2 cmdstanr model
plot(<epinow>) maturing
Plot method for epinow
regional_epinow() maturing
Real-time Rt Estimation, Forecasting and Reporting by Region
summary(<epinow>) stable
Summary output from epinow

Estimate, Simulate, and Forecast Parameters

Function to estimate, simulate and forecast parameters of interest.

estimate_infections() maturing
Estimate Infections, the Time-Varying Reproduction Number and the Rate of Growth
forecast_infections() stable
Forecast infections from a given fit and trajectory of the time-varying reproduction number
estimate_secondary() stable
Estimate a Secondary Observation from a Primary Observation
forecast_secondary() experimental
Forecast Secondary Observations Given a Fit from estimate_secondary
estimate_delay() maturing
Estimate a Delay Distribution
estimate_truncation() stable
Estimate Truncation of Observed Data

Specify an Argument

Functions used by estimate_infections

backcalc_opts() stable
Back Calculation Options
delay_opts() stable
Delay Distribution Options
filter_opts() maturing
Filter Options for a Target Region
gt_opts() generation_time_opts() stable
Generation Time Distribution Options
gp_opts() stable
Approximate Gaussian Process Settings
obs_opts() stable
Observation Model Options
rstan_opts() deprecated
Rstan Options
rstan_sampling_opts() deprecated
Rstan Sampling Options
rstan_vb_opts() deprecated
Rstan Variational Bayes Options
rt_opts() stable
Time-Varying Reproduction Number Options
secondary_opts() stable
Secondary Reports Options
stan_laplace_opts() experimental
Stan Laplace algorithm Options
stan_opts() stable
Stan Options
stan_pathfinder_opts() experimental
Stan pathfinder algorithm Options
stan_sampling_opts() stable
Stan Sampling Options
stan_vb_opts() stable
Stan Variational Bayes Options
trunc_opts() stable
Truncation Distribution Options
opts_list() maturing
Return an _opts List per Region

Summarise Across Regions

Functions used for summarising across regions (designed for use with regional_epinow)

regional_summary() maturing
Regional Summary Output
regional_runtimes() maturing
Summarise Regional Runtimes
get_regional_results() stable
Get Combined Regional Results

Summarise results

Functions for summarising results

summary(<epinow>) stable
Summary output from epinow
summary(<estimate_infections>) stable
Summary output from estimate_infections
backcalc_opts() stable
Back Calculation Options
calc_CrI() stable
Calculate Credible Interval
calc_CrIs() stable
Calculate Credible Intervals
calc_summary_measures() stable
Calculate All Summary Measures
calc_summary_stats() stable
Calculate Summary Statistics
make_conf() stable
Format Credible Intervals
map_prob_change() stable
Categorise the Probability of Change for Rt

Plot Results

Plot generated results

plot(<dist_spec>) experimental
Plot PMF and CDF for a dist_spec object
plot(<epinow>) maturing
Plot method for epinow
plot(<estimate_infections>) maturing
Plot method for estimate_infections
plot(<estimate_secondary>) experimental
Plot method for estimate_secondary
plot(<estimate_truncation>) experimental
Plot method for estimate_truncation
plot_CrIs() stable
Plot EpiNow2 Credible Intervals
plot_estimates() questioning
Plot Estimates
plot_summary() questioning
Plot a Summary of the Latest Results
report_plots() questioning
Report plots

Report results

Functions to report results

report_plots() questioning
Report plots
report_summary() questioning
Provide Summary Statistics for Estimated Infections and Rt

Define and Parameterise Distributions

Functions to define and parameterise distributions

LogNormal() Gamma() Normal() Fixed() NonParametric()
Probability distributions
c(<dist_spec>) experimental
Combines multiple delay distributions for further processing
collapse(<dist_spec>) experimental
Collapse nonparametric distributions in a <dist_spec>
discretise(<dist_spec>) discretize() experimental
Discretise a <dist_spec>
fix_parameters(<dist_spec>) experimental
Fix the parameters of a <dist_spec>
is_constrained(<dist_spec>) experimental
Check if a <dist_spec> is constrained, i.e. has a finite maximum or nonzero CDF cutoff.
max(<dist_spec>) experimental
Returns the maximum of one or more delay distribution
mean(<dist_spec>) experimental
Returns the mean of one or more delay distribution
new_dist_spec() experimental
Internal function for generating a dist_spec given parameters and a distribution.
plot(<dist_spec>) experimental
Plot PMF and CDF for a dist_spec object
`+`(<dist_spec>) experimental
Creates a delay distribution as the sum of two other delay distributions.
print(<dist_spec>) experimental
Prints the parameters of one or more delay distributions
bound_dist() experimental
Define bounds of a <dist_spec>
get_parameters() experimental
Get parameters of a parametric distribution
get_pmf() experimental
Get the probability mass function of a nonparametric distribution
get_distribution() experimental
Get the distribution of a <dist_spec>

Fit delay Distributions

Functions to fit delay distributions

bootstrapped_dist_fit() stable
Fit a Subsampled Bootstrap to Integer Values and Summarise Distribution Parameters
dist_fit() stable
Fit an Integer Adjusted Exponential, Gamma or Lognormal distributions

Simulate

Functions to help with simulating data or mapping to reported cases

simulate_infections()
Simulate infections using the renewal equation
simulate_secondary()
Simulate secondary observations from primary observations
convolve_and_scale()
Convolve and scale a time series

Data

Package datasets that may be used to parameterise other functions or in examples

example_generation_time stable
Example generation time
example_incubation_period stable
Example incubation period
example_reporting_delay stable
Example reporting delay
example_confirmed stable
Example Confirmed Case Data Set
example_truncated stable
Example Case Data Set with Truncation
generation_times deprecated
Literature Estimates of Generation Times
incubation_periods deprecated
Literature Estimates of Incubation Periods

Get/Extract Data

Functions for extracting data from objects or getting data from sources

get_distribution() experimental
Get the distribution of a <dist_spec>
get_parameters() experimental
Get parameters of a parametric distribution
get_pmf() experimental
Get the probability mass function of a nonparametric distribution
get_regional_results() stable
Get Combined Regional Results
extract_CrIs() stable
Extract Credible Intervals Present
extract_inits() experimental
Generate initial conditions from a Stan fit
extract_samples()
Extract all samples from a stan fit
extract_stan_param() stable
Extract a Parameter Summary from a Stan Object

Clean Data

Functions for cleaning data

clean_nowcasts() stable
Clean Nowcasts for a Supplied Date
clean_regions() stable
Clean Regions

Setup Utilities

Function used for setting up functionality

setup_default_logging() questioning
Setup Default Logging
setup_future() stable
Set up Future Backend
setup_logging() questioning
Setup Logging

Utilities

Utility functions

run_region() maturing
Run epinow with Regional Processing Code
expose_stan_fns() stable
Expose internal package stan functions in R
convert_to_logmean() stable
Convert mean and sd to log mean for a log normal distribution
convert_to_logsd() stable
Convert mean and sd to log standard deviation for a log normal distribution
growth_to_R() questioning
Convert Growth Rates to Reproduction numbers.
R_to_growth() questioning
Convert Reproduction Numbers to Growth Rates
update_secondary_args() stable
Update estimate_secondary default priors