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

Linelist data

Functions for preparing linelist data

as_epidist_linelist_data()
Create an epidist_linelist_data object
as_epidist_linelist_data(<data.frame>)
Create an epidist_linelist_data object from a data frame with event dates
as_epidist_linelist_data(<default>)
Create an epidist_linelist_data object from vectors of event times
assert_epidist(<epidist_linelist_data>)
Assert validity of epidist_linelist_data objects
is_epidist_linelist_data()
Check if data has the epidist_linelist_data class
new_epidist_linelist_data()
Class constructor for epidist_linelist_data objects

Assert validity of objects

Functions used to assert the validity of package objects

assert_epidist()
Validation for epidist objects

Family

Functions related to specifying custom brms families

epidist_family()
Define epidist family
epidist_family_model() epidist_formula_model()
The model-specific parts of an epidist_family() call
epidist_family_model(<default>)
Default method for defining a model specific family
epidist_family_reparam()
Reparameterise an epidist family to align brms and Stan
epidist_family_reparam(<default>)
Default method for families which do not require a reparameterisation
epidist_family_reparam(<gamma>)
Reparameterisation for the gamma family

Formula

Functions related to specifying custom brms formula

epidist_family_model() epidist_formula_model()
The model-specific parts of an epidist_family() call
epidist_formula()
Define a model specific formula
epidist_formula_model(<default>)
Default method for defining a model specific formula

Prior distributions

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

Stan code

Functions for specifying custom Stan code to put into brms

epidist_stancode()
Define model specific Stan code
epidist_stancode(<default>)
Default method for defining model specific Stan code

Model fitting

Functions for fitting delay distribution models using brms

epidist()
Fit epidemiological delay distributions using a brms interface
epidist(<default>)
Default method used for interface using brms

Latent model

Specific methods for the latent model

as_epidist_latent_model()
Convert an object to an epidist_latent_model object
as_epidist_latent_model(<epidist_linelist_data>)
The latent model method for epidist_linelist_data objects
epidist_family_model(<epidist_latent_model>)
Create the model-specific component of an epidist custom family
epidist_formula_model(<epidist_latent_model>)
Define the model-specific component of an epidist custom formula
is_epidist_latent_model()
Check if data has the epidist_latent_model class
new_epidist_latent_model()
Class constructor for epidist_latent_model objects

Naive model

Specific methods for the naive model

as_epidist_naive_model()
Prepare naive model to pass through to brms
as_epidist_naive_model(<epidist_linelist_data>)
The naive model method for epidist_linelist_data objects
is_epidist_naive_model()
Check if data has the epidist_naive_model class
new_epidist_naive_model()
Class constructor for epidist_naive_model objects

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)

Diagnostic functions

epidist_diagnostics()
Diagnostics for epidist_fit models

Reexported functions

reexports lognormal weibull Gamma bf
Objects exported from other packages