Description Usage Arguments Value Author(s) Examples
View source: R/proba_observation.R
1) Rough expectation for R ($approx_R) 2) Possible outbreak sizes ($possible_size) 3) new format for observations ($y_obs_reformat) 4) g: the probability of observing y given z,rho (reporting rate), with z the true number of cases (reported and un-reported cases) ($p_y_z) 5) g0: the probability of not observing an outbreak (i.e. y=0 or no cases) given z and rho.
1 | proba_observation(y, rho, threshold)
|
y: |
a vector of outbreak sizes observations. |
rho: |
the probability of a single case being detected. |
threshold: |
the maximum true final size of an outbreak. this need to be much higher than the largest observed outbreak to account for reporting and properly evaluate the distribution of outbreak sizes |
The function returns a list including:
approx_R: a naive approximation of the reproduction number.
y_obs_reformat: the observed incidence over time accounting for under-reporting (rho).
possible_size: same as reported_incidence, but only including simulated outbreaks for which at least a single case was observed (i.e. outbreak for which the observed final size is 0, see below reported_size, are removed).
p_y_z: the probability of observing y given z,rho (reporting rate), with z the true number of cases (reported and un-reported cases)
p_0_z: the probability of not observing an outbreak (i.e. y=0 or no cases) given z and rho.
#'
Pierre Nouvellet (p.nouvellet@imperial.ac.uk)
1 2 | x <- proba_observation(c(1,2,3),.5,1e3)
x
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.