plot_simobs_beta | R Documentation |
Plot the observed data and the simulated epidemic generated
from the initial parameter values. Also plot the time-varying transmission rate.
This function is typically used to check an initial guess for priors
(e.g., transmission rate (beta
), wastewater scaling factor (ww.scale
))
before launching the procedure that fits selected model parameters to data.
plot_simobs_beta(
data,
prm,
include.cases = TRUE,
include.ww = TRUE,
include.hosp = FALSE,
log.scale = FALSE,
time.range = NULL
)
data |
Data object (list) as returned by |
prm |
List of all parameter values. |
include.cases |
Logical. Display observations of reported cases? |
include.ww |
Logical. Display observed viral concentration in wastewater? |
include.hosp |
Logical. display hospital observations? |
log.scale |
Logical. Use log scale? |
time.range |
Numerical vector. Minimum and maximum values for the x axis. |
A ggplot2
object.
# Load data sets examples from `wem` package:
data('cases')
data('hosp')
data('wwviralconc')
# Build the data object:
dat = build_data(cases = cases,
hosp = hosp,
ww = wwviralconc,
hosp.type = 'hosp.adm',
case.date.type = 'report')
# Load example of model parameters
prm = model_prm_example()
# Plot data, simulation and
# time-dependent transmission rate (beta)
g = plot_simobs_beta(data = dat,
prm = prm,
include.cases = TRUE,
include.ww = TRUE,
include.hosp = FALSE,
log.scale = FALSE,
time.range = NULL)
plot(g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.