| epiworld-repnum | R Documentation |
Extraction and plotting of the reproductive number (Rt) by virus over time.
get_reproductive_number(x)
## S3 method for class 'epiworld_repnum'
plot(
x,
y = NULL,
ylab = "Average Rep. Number",
xlab = "Day (step)",
main = "Reproductive Number",
type = "b",
plot = TRUE,
...
)
plot_reproductive_number(x, ...)
x |
An object of class |
y |
Ignored. |
ylab, xlab, main, type |
Further parameters passed to |
plot |
Logical scalar. If |
... |
In the case of plot methods, further arguments passed to graphics::plot. |
The plot_reproductive_number function is a wrapper around
get_reproductive_number that plots the result.
The get_reproductive_number function returns an object of class
epiworld_repnum.
The plot method for epiworld_repnum returns a plot of the reproductive
number over time.
Other Epidemiological metrics:
epiworld-gentime
# SEIR Connected model
seirconn <- ModelSEIRCONN(
name = "Disease",
n = 10000,
prevalence = 0.1,
contact_rate = 2.0,
transmission_rate = 0.8,
incubation_days = 7.0,
recovery_rate = 0.3
)
set.seed(937)
run(seirconn, 50)
# Retrieving (and plotting) the reproductive number
rp <- get_reproductive_number(seirconn)
plot(rp) # Also equivalent to plot_reproductive_number(seirconn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.