infer_multittree_share_param: Simultaneously infer transmission trees given phylogenetic...

Description Usage Arguments Value Author(s)

View source: R/infer_multittree_share_param.R

Description

Simultaneously infer transmission trees given phylogenetic trees User can specify any subset of parameters that will be shared by providing a character vector of parameter names to the argument "share".

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
infer_multittree_share_param(
  ptree_lst,
  w.shape = 2,
  w.scale = 1,
  ws.shape = w.shape,
  ws.scale = w.scale,
  mcmcIterations = 1000,
  thinning = 1,
  startNeg = 100/365,
  startOff.r = 1,
  startOff.p = 0.5,
  startPi = 0.5,
  prior_pi_a = 1,
  prior_pi_b = 1,
  updateNeg = TRUE,
  updateOff.r = TRUE,
  updateOff.p = FALSE,
  updatePi = TRUE,
  share = NULL,
  startCTree_lst = rep(NA, length(ptree_lst)),
  updateTTree = TRUE,
  optiStart = 2,
  dateT = Inf,
  verbose = F
)

Arguments

ptree_lst

List of phylogenetic tree

w.shape

Shape parameter of the Gamma probability density function representing the generation time

w.scale

Scale parameter of the Gamma probability density function representing the generation time

ws.shape

Shape parameter of the Gamma probability density function representing the sampling time

ws.scale

Scale parameter of the Gamma probability density function representing the sampling time

mcmcIterations

Number of MCMC iterations to run the algorithm for

thinning

MCMC thinning interval between two sampled iterations

startNeg

Starting value of within-host coalescent parameter Ne*g

startOff.r

Starting value of parameter off.r

startOff.p

Starting value of parameter off.p

startPi

Starting value of sampling proportion pi

prior_pi_a

First shape parameter of Beta prior for pi

prior_pi_b

Second shape parameter of Beta prior for pi

updateNeg

Whether of not to update the parameter Ne*g

updateOff.r

Whether or not to update the parameter off.r

updateOff.p

Whether or not to update the parameter off.p

updatePi

Whether or not to update the parameter pi

share

Character vector of parameters to be shared. For example, share = c("off.r", "off.p") would share the offspring distribution. Allowed parameter names are "neg", "off.r", "off.p" and "pi".

startCTree_lst

Optional combined list of trees to start from

updateTTree

Whether or not to update the transmission tree

optiStart

Type of optimisation to apply to MCMC start point (0=none, 1=slow, 2=fast)

dateT

Date when process stops (this can be Inf for fully simulated outbreaks)

verbose

Whether or not to use verbose mode (default is false)

Value

list the same size as input, each element contains posterior transmission trees inferred from corresponding phylogenetic tree

Author(s)

Yuanwei Xu


TransPhylo documentation built on April 20, 2021, 5:09 p.m.