Description Usage Arguments Details Value Examples
View source: R/count_metrics.R
Calculates the ratio of the most current to previous period counts. Values greater than 1 indicate growing; less than one indicate shrinking. NOTE: Counts must have the same period (e.g. both summed over 7 consecutive days.) In order to avoid extreme values and dividing by zeros, the ratio uses an offset of 0.5 for both the numerator and denominator as pseudocounts and is capped at 5 (i.e. a 400% increase).
1 | score_trajectory(curr, prev)
|
curr |
vector of counts for current period (must be non-negative integer) |
prev |
vector of counts for previous period (must be non-negative integer) |
The 0.5 offset was inspired by the bayes.poisson.test
function from
the BayesianFirstAid packages uses a non-informative prior distribution
whose mean simplifies to approximately 0.5. For more information, see the
reproducibility paper on the OHI Surveillance Team's SharePoint site.
a numeric vector
1 | traj <- score_trajectory(curr = 100L, prev = 80L)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.