plot_R0: Contour plot of R_eff for different values of lambda and mu.

Description Usage Arguments Value

View source: R/plotting-functions.R

Description

The plot shows a colour map of R_eff across a range of values for the rate at which infectious interactions occur, and the 0.95th quantile for the number of individuals infected at each infectious event. The plot also highlights a specific value of R_eff, corresponding to λ = my_lambda, and 0.95th quantile my_q95. The value of R_eff is shown in shades of red for values greater than one, and blue for values smaller than one.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plot_R0(
  my_lambda,
  my_q95,
  tbar,
  lambda_lim = c(0.02, 0.2),
  q95_lim = c(2, 10),
  q = 0,
  mbar = NA,
  n = 32
)

Arguments

my_lambda

The Poisson rate of infectious interactions.

my_q95

The 0.95th quantile of the logarithmic distribution governing the

tbar

The average duration of the communicable period.

lambda_lim

A vector of two values covering the range of lambda.

q95_lim

A vector of two values covering the range of the 0.95th quantile of the logarithmic distribution governing the number of new infections occurring in each infectious interaction.

q

The probability of an infection belonging to a second class of infections, with average duration mbar, instead of tbar (e.g. when modelling contact tracing).

mbar

Average value of the communicable period for infections of the second kind. This parameter is unused when q = 0.

n

Grid size for calculating R_eff values.

Value

A ggplot object.


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