Core Functions

prepare_epifusion_tree()

Prepare a tree (or trees) for EpiFusion

generate_epifusion_XML()

Generate an EpiFusion XML file

run_epifusion()

Run EpiFusion from R

load_raw_epifusion()

Load results from EpiFusion folder into an R object

extract_posterior_epifusion()

Parse results from raw EpiFusion object into a R object with infection, Rt, cumulative infection and parameter posteriors

trajectory_table()

Extract a trajectory table from an EpiFusion posterior R object

Sample Datasets

baseline_dataset()

Load baseline simulated dataset for trying EpiFusion

sampling_dataset()

Load step-change in sampling simulated dataset for trying EpiFusion

Individual Result Loading Functions

load_acceptance()

Load acceptance rates from EpiFusion folder into an R object

load_beta_trajectories()

Load beta trajectories from EpiFusion output folder into a list of dataframes

load_cumulativeinfection_trajectories()

Load cumulative infections trajectories from EpiFusion output folder into a list of dataframes

load_fitted_epi_cases()

Load trajectories of fitted epidemiological cases from EpiFusion output folder into a list of dataframes

load_infection_trajectories()

Load infection trajectories from EpiFusion folder into a list of dataframes

load_likelihoods()

Load likelihood trace from each chain of an EpiFusion analysis

load_parameter_samples()

Load parameter samples from EpiFusion analysis

load_rt_trajectories()

Load Rt trajectories from EpiFusion folder into a list of dataframes

Plotting Functions

plot_likelihood_trace()

Plots the likelihood trace of the chains of an EpiFusion analysis

plot_parameter_trace()

Plot the parameter traces from a raw EpiFusion object

plot_trajectories()

Plot the trajectory posteriors from a parsed EpiFusion trajectory table

plot_chainwise_trajectories()

Plot the trajectory posteriors from a raw EpiFusion object separated by chain

Other Functions

calculate_daily_infections()

Calculate means and HPD intervals of new infections per day from the cumulative infections posterior samples