Skip to contents

Simulation

Tools for simulating datasets

simulate_exponential_cases()
Simulate exponential cases
simulate_gillespie()
Simulate cases from a stochastic SIR model
simulate_secondary()
Simulate secondary events based on a delay distribution
simulate_uniform_cases()
Simulate cases from a uniform distribution

Observe

Functions for observing data

filter_obs_by_obs_time()
Filter observations based on a observation time of secondary events
filter_obs_by_ptime()
Filter observations based on the observation time of primary events
observe_process()
Observation process for primary and secondary events

S3 generics

S3 generics for delay modelling

epidist()
Fit epidemiological delay distributions using a brms interface
epidist_family()
Define model specific family
epidist_formula()
Define a model specific formula
epidist_stancode()
Define model specific Stan code
epidist_validate()
Validate a data object for use with epidist()

Method default

Default methods for S3 generics

epidist(<default>)
Default method used for interface using brms
epidist_family(<default>)
Default method for defining a model specific family
epidist_formula(<default>)
Default method for defining a model specific formula
epidist_stancode(<default>)
Default method for defining model specific Stan code
epidist_validate(<default>)
Default method for data validation

Priors

Functions for specifying prior distributions

epidist_family_prior()
Family specific prior distributions
epidist_family_prior(<default>)
Default family specific prior distributions
epidist_family_prior(<lognormal>)
Family specific prior distributions for the lognormal family
epidist_model_prior()
Model specific prior distributions
epidist_model_prior(<default>)
Default model specific prior distributions
epidist_prior()
Define prior distributions using brms defaults, model specific priors, family specific priors, and user provided priors

Latent individual model

Specific methods for the latent individual model

as_latent_individual()
Prepare latent individual model
epidist_family(<epidist_latent_individual>)
Check if data has the epidist_latent_individual class
epidist_formula(<epidist_latent_individual>)
Define a formula for the latent_individual model
epidist_validate(<epidist_latent_individual>)
Validate latent individual model data
is_latent_individual()
Check if data has the epidist_latent_individual class

Postprocess

Functions for postprocessing model output

add_mean_sd()
Add natural scale mean and standard deviation parameters
add_mean_sd(<default>)
Default method for add natural scale parameters
add_mean_sd(<gamma_samples>)
Add natural scale mean and standard deviation parameters for a latent gamma model
add_mean_sd(<lognormal_samples>)
Add natural scale mean and standard deviation parameters for a latent lognormal model
predict_delay_parameters() predict_dpar()
Extract samples of the delay distribution parameters

Data

Data included with the package

sierra_leone_ebola_data
Ebola linelist data from Fang et al. (2016)

Utility functions

Diagnostic functions

epidist_diagnostics()
Diagnostics for epidist_fit models