generate_obs_noise | R Documentation |
Generate observation noise on the reported values for clinical cases (variable 'report') and concentration in wastewater (variable 'WWreport'). The observations are generated by drawing samples from a negative binomial distribution with mean the value from the deterministic model and a variance parametrized using the coefficient of variation (std. dev / mean).
generate_obs_noise(df, prms = list(cv = 0.1, cv.ww = 0.1))
df |
Dataframe. The time series of the epidemiological variables generated
by the function |
prms |
List of parameters. Must contain elements named |
The input dataframe with three additional variables,
report.obs
, hosp.admission.obs
and WWreport.obs
, representing the
simulated observations of the variables report
, hosp.admission
and WWreport
.
prm = model_prm_example()
sim = simul(prm)
df = generate_obs_noise(sim$ts)
plot(x=df$time, y=df$report.obs) ; lines(x=df$time, y=df$report)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.