Skip to contents

Estimation + Reporting

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

epinow()
Real-time Rt Estimation, Forecasting and Reporting
plot(<epinow>)
Plot method for epinow
regional_epinow()
Real-time Rt Estimation, Forecasting and Reporting by Region
summary(<epinow>)
Summary output from epinow

Estimate, Simulate, and Forecast Parameters

Function to estimate, simulate and forecast parameters of interest.

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

Specify an Argument

Functions used by estimate_infections

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

Summarise Across Regions

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

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

Summarise results

Functions for summarising results

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

Plot Results

Plot generated results

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

Report results

Functions to report results

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

Define, Fit and Parameterise Distributions

Functions to define, fit and parameterise distributions

LogNormal() Gamma() Normal() Fixed() NonParametric()
Probability distributions
apply_tolerance()
Applies a threshold to all nonparametric distributions in a <dist_spec>
collapse()
Collapse nonparametric distributions in a <dist_spec>
discretise() discretize()
Discretise a <dist_spec>
bootstrapped_dist_fit()
Fit a Subsampled Bootstrap to Integer Values and Summarise Distribution Parameters
fix_dist()
Fix the parameters of a <dist_spec>
get_distribution()
Get the distribution of a <dist_spec>
new_dist_spec()
Internal function for generating a dist_spec given parameters and a distribution.
c(<dist_spec>)
Combines multiple delay distributions for further processing
dist_fit()
Fit an Integer Adjusted Exponential, Gamma or Lognormal distributions
dist_skel()
Distribution Skeleton
max(<dist_spec>)
Returns the maximum of one or more delay distribution
mean(<dist_spec>)
Returns the mean of one or more delay distribution
plot(<dist_spec>)
Plot PMF and CDF for a dist_spec object
`+`(<dist_spec>)
Creates a delay distribution as the sum of two other delay distributions.
print(<dist_spec>)
Prints the parameters of one or more delay distributions
get_parameters()
Get parameters of a parametric distribution
get_pmf()
Get the probability mass function of a nonparametric distribution

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
Example generation time
example_incubation_period
Example incubation period
example_reporting_delay
Example reporting delay
example_confirmed
Example Confirmed Case Data Set
example_truncated
Example Case Data Set with Truncation
generation_times
Literature Estimates of Generation Times
incubation_periods
Literature Estimates of Incubation Periods

Get/Extract Data

Functions for extracting data from objects or getting data from sources

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

Clean Data

Functions for cleaning data

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

Setup Utilities

Function used for setting up functionality

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

Utilities

Utility functions

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