This function takes a phylogenetic tree and/or case incidence data, in addition to some other information (analysis index date etc) and creates a parameter file for EpiFusion in eXtensible Markup Language.

generate_epifusion_XML(
  tree = NA,
  case_incidence = NA,
  index_date,
  loggers = NA,
  analysis = NA,
  model = NA,
  parameters = NA,
  priors = NA,
  xml_filepath = "input.xml"
)

Arguments

tree

phylogenetic tree (in S3 Phylo Object format) with branch lengths in terms of days, or path to a file with the formatted tree(s)

case_incidence

a data frame with case incidence and their date of occurrence. The data frame should consist of two columns: 'Date', a column with the observation dates, and 'Cases', a numeric column with reported cases on the corresponding day.

index_date

the date, in format, that you want to start modelling the outbreak from. Should be some time before

loggers

list of logging information (frequency, where to log the results files)

analysis

(optional) list of analysis instructions (e.g. how you wish to fit beta), if you wish to deviate from the default

model

(optional) list of model instructions (e.g. epidemiological observation model), if you wish to deviate from the default

parameters

(optional) list of parameters (e.g. how many MCMC steps), if you wish to deviate from the default

priors

(optional) list of prior distributions for the pMCMC

xml_filepath

filepath to write the complete XML file