calc_avg_path: Compute average epidemic path

Description Usage Arguments Value

View source: R/utility-functions.R

Description

Compute average epidemic path

Usage

1
2
3
4
5
6
7
8
calc_avg_path(
  lambda = 0.11,
  mu = 1.5,
  A = 5.5,
  B = 0.85,
  tmax = 100,
  nstep = 10000
)

Arguments

lambda

A non-negative scalar. Rate parameter for the Poisson distribution that governs the number of infectious events per parent node.

mu

A scalar greater than 1. Average number of infections resulting from each infectious interaction.

A

The shape parameter of the gamma life time distribution (default: 5.5).

B

The rate parameter of the gamma life time distribution (default: 0.85).

tmax

A scalar greater than 0. Calculate path for times between 0 and this value.

nstep

Grid size.

Value

A data.frame with columns time, n_infected (cumulative number infected – strictly increasing), n_infectious (number infectious at time time).


pspc-data-science/branchsim documentation built on Jan. 19, 2021, 10:10 a.m.