Learn R Programming

outbreaker (version 1.1-8)

get.Rt: Derive reproduction numbers from outbreak's outputs

Description

These functions are used to compute reproduction numbers and derive incidence curves from outbreaker's ouptput (functions outbreaker and outbreaker.parallel). They all rely on the entire outbreak having been sampled.

  • get.R derive distributions of individual effective reproduction numbers.

  • get.Rt derives effective reproduction numbers averaged for each time step.

  • get.incid derives incidence curves for each time step.

Usage

get.Rt(x, burnin = 20000, plot = TRUE, type = c("boxplot", "lines"),
  lines = FALSE, fill.col = "gold", lines.col = transp("grey"), ...)

get.R(x, burnin = 20000, ...)

get.incid(x, burnin = 20000, plot = TRUE, type = c("boxplot", "lines"), lines = FALSE, fill.col = "gold", lines.col = transp("grey"), ...)

Arguments

x

the output of outbreaker or outbreaker.parallel.

burnin

an integer indicating the number of steps of the MCMC to be discarded as burnin period. Defaults to 20,000.

plot

a logical indicating whether a plot should be displayed.

type

a character indicating the type of plot to be used.

lines

a logical indicating whether individual lines should be added to the plot.

fill.col

the color to be used for the boxplot.

lines.col

the color to be used to the lines.

further arguments to be passed to other functions.

Value

These functions return a data.frame containing the plotted information.

Examples

Run this code
# NOT RUN {
## load data
data(fakeOutbreak)
attach(fakeOutbreak)

## individual R
barplot(table(get.R(res)), main="Individual effective reproduction numbers")

## R(t)
get.Rt(res)

## incidence
get.incid(res)

detach(fakeOutbreak)


# }

Run the code above in your browser using DataLab