class_trajectory: Classify Trajectory Measure for County Data

Description Usage Arguments Value Examples

View source: R/count_metrics.R

Description

This function tests to see if the count trajectory is statistically distinct from zero with a Poisson test for the ratio of two counts using poisson.test as.calculated by pval_trajectory at the two-sided p < .05 level. If it is and the ratio as calculated by score_trajectory is less than or equal to 0.9, the trajectory is classified as shrinking. If it is and the ration is greather than or equal to 1.1, the trajectory is classified as growing. If the test fails to reject the null hypothesis, the trajectory is classified as not statistically significant.

Usage

1
class_trajectory(traj, pval)

Arguments

traj

trajectory as calculated by score_trajectory

pval

p-value as calculated by pval_trajectory

Value

an ordered factor "Shrinking" < "No statistically significant change" < "Growing"

Examples

1
2
3
4
traj <- score_trajectory(curr = 100L, prev = 80L)
traj_pval  <- pval_trajectory(curr = 100L, prev = 80L)

traj_class <- class_trajectory(traj, traj_pval)

Skomim/COVID_trajectory_Madison documentation built on July 19, 2020, 12:34 a.m.