burnin_phybreak: MCMC updating of a phybreak-object.

Description Usage Arguments Value Author(s) References Examples

View source: R/burnin_phybreak.R

Description

This function allows the MCMC chain to burn in. If used after samples have been taken (with sample_phybreak), these samples will be returned unchanged in the output (burnin.phybreak is deprecated).

Usage

1
2
3
4
burnin_phybreak(x, ncycles, classic = 0, keepphylo = 0,
  withinhost_only = 0, parameter_frequency = 1, status_interval = 10)

burnin.phybreak(...)

Arguments

x

An object of class phybreak.

ncycles

Number of iterations to be carried out. Each iteration does one update of all parameters and tree updates with each host as focal host once.

classic

The proportion of tree updates with the classic protocol (reference see below), in which within-host minitrees are proposed by simulating coalescent times and tree topology. In the current default protocol only coalescent times are proposed with the minitree topology kept intact. This is followed by removing and reconnecting the sampling tips one by one. This results in better mixing of the mcmc-chain if there is much genetic information (many SNPs) and/or if there are many possible within-host minitree topologies (e.g. many samples per host). The classic protocol is faster in terms of updates/second and can thus be more efficient with little genetic information.

keepphylo

The proportion of tree updates keeping the phylogenetic tree intact, only possible if there is one sample per host and the wh.model = "linear" with complete bottleneck.

withinhost_only

The proportion of tree updates in which only the within-host minitree is sampled, and the transmission tree and infection times are kept unchanged.

parameter_frequency

The relative frequency by which the model parameters are updated relative to updating each host.

status_interval

The number of seconds between each on-screen print of the progress of the mcmc-chain.

Value

The phybreak object provided as input, with variables and parameters changed due to the updating.

Author(s)

Don Klinkenberg don@xs4all.nl

References

Klinkenberg et al. (2017) Simultaneous inference of phylogenetic and transmission trees in infectious disease outbreaks. PLoS Comput Biol, 13(5): e1005495.

Examples

1
2
3
4
5
#First create a phybreak object
simulation <- sim_phybreak(obsize = 5)
MCMCstate <- phybreak(dataset = simulation)

MCMCstate <- burnin_phybreak(MCMCstate, ncycles = 50)

donkeyshot/phybreak documentation built on Sept. 17, 2021, 9:32 p.m.