Skip to contents

ABC workflow

abc_adaptive()
Perform ABC sequential adaptive fitting
abc_rejection()
Perfom simple ABC rejection algorithm
abc_smc()
Perform ABC sequential Monte Carlo fitting
calculate_rmse()
Generate a function to calculate a Root Mean Squared Error (RMSE)
calculate_wasserstein()
Calculate a Wasserstein distance
default_termination_fn()
Set up default convergence criteria for SMC and adaptive ABC
fixed_wave_termination_fn()
Run the SMC or adaptive algorithm for a set number of waves
plot_convergence()
Plot convergence metrics by wave for SMC and adaptive ABC
plot_correlations()
A parameter posterior correlation plot
plot_evolution()
Plot the evolution of the density function by wave for SMC and adaptive ABC
plot_simulations()
Spaghetti plot of resampled posterior fits
posterior_distance_metrics()
Generate a set of metrics from component scores
posterior_fit_analytical()
Fit analytical distribution to posterior samples for generating more waves
posterior_fit_empirical()
Fit empirical distribution to posterior samples for generating more waves
posterior_resample()
Generate a set of samples from selected posteriors
posterior_summarise()
Calculate a basket of summaries from a weighted list of posterior samples
priors()
Construct a set of priors
test_simulation()
Run the simulation for one set of parameters
wasserstein_calculator() experimental
Generate a function to calculate a wasserstein distance

Empirical, mixture and truncated distributions

empirical()
Fit a piecewise logit transformed linear model to cumulative data
empirical_cdf()
Fit a piecewise logit transformed linear model to a CDF
empirical_data()
Fit a piecewise logit transformed linear model to weighted data
kurtosis()
Calculate the excess kurtosis of a set of data
mixture()
Construct a mixture distribution
skew()
Calculate the skew of a set of data
transform()
Generate a distribution from a link transform of another
truncate()
Generate a distribution from a truncation of another
wbw.nrd()
Weighted bandwidth selector
widen()
Increase the dispersion of a distribution
wmean()
Weighted mean
wquantile()
Quantile from weighted data with link function support
wsd()
Weighted standard deviation

Reparameterised and non-standard 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
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

S3 abc fit class

S3 abc prior class

S3 distribution function class

as.dist_fns()
Create a dist_fns S3 object
c(<dist_fns>)
Concatenate a dist_fns S3 object or dist_fns_lists
dist_fns()
Create an empty dist_fns_list
format(<dist_fns>)
Format a dist_fns S3 object
is.dist_fns()
Check if this is a dist_fns S3 object
is.dist_fns_list()
Check if this is a dist_fns_list S3 object
map2_dist_fns()
Map over two inputs returning a dist_fns_list
map_dist_fns()
Apply a function to each element of a vector returning a dist_fns_list
plot(<dist_fns>)
Plot a dist_fns S3 object
plot(<dist_fns_list>)
Plot a dist_fns_list S3 object
pmap_dist_fns()
Map over multiple inputs returning a dist_fns_list
as.link_fns()
Create a link_fns S3 object
c(<link_fns>)
Concatenate a link_fns S3 object or link_fns_lists
format(<link_fns>)
Format a link_fns S3 object
is.link_fns()
Check if this is a link_fns S3 object
is.link_fns_list()
Check if this is a link_fns_list S3 object
link_fns()
Create an empty link_fns_list
map2_link_fns()
Map over two inputs returning a link_fns_list
map_link_fns()
Apply a function to each element of a vector returning a link_fns_list
pmap_link_fns()
Map over multiple inputs returning a link_fns_list

Others

sim_outbreak
The sim_outbreak dataset