simulateOutbreak: Simulate an outbreak

Description Usage Arguments Value Examples

View source: R/simulateOutbreak.R

Description

Simulate an outbreak

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
simulateOutbreak(
  off.r = 1,
  off.p = 0.5,
  neg = 0.25,
  nSampled = NA,
  pi = 0.5,
  w.shape = 2,
  w.scale = 1,
  ws.shape = NA,
  ws.scale = NA,
  w.mean = NA,
  w.std = NA,
  ws.mean = NA,
  ws.std = NA,
  dateStartOutbreak = 2000,
  dateT = Inf
)

Arguments

off.r

First parameter of the negative binomial distribution for offspring number

off.p

Second parameter of the negative binomial distribution for offspring number

neg

the within-host effective population size (Ne) timesgeneration duration (g)

nSampled

number of sampled infected individuals, or NA for any

pi

probability of sampling an infected individual

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

w.mean

Mean of the Gamma distribution representing the generation time

w.std

Std of the Gamma distribution representing the generation time

ws.mean

Mean of the Gamma distribution representing the sampling time

ws.std

Std of the Gamma distribution representing the sampling time

dateStartOutbreak

Date when index case becomes infected

dateT

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

Value

Combined phylogenetic and transmission tree

Examples

1
2
simulateOutbreak()
simulateOutbreak(off.r=2,dateStartOutbreak=2010,dateT=2015)

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