Rtoriginal: Computes the effective reproductive number using a Alerta's...

Description Usage Arguments Value Examples

View source: R/Rt_functions.R

Description

Calculates the effective reproductive number from the growth rate of cases. The The original formulation is simply the ratio between 3-weeks accumulated cases at week (t+1) and the 3-weeks accumulated cases at week t.

Usage

1
2
3
4
5
6
7
8
9
Rtoriginal(
  obj,
  count = "casos",
  meangt,
  CI = "beta",
  alpha = 0.95,
  a0 = 2,
  b0 = 3
)

Arguments

obj

object with the format of getcases. A data.frame with variables "casos" and "SE".

count

case counts (adjusted or nonadjusted incidence).

meangt

the exact period between primary and secondary infections

CI

Model used to compute the confidence interval. "beta" is the only choice.

Value

data.frame with estimated Rt and confidence intervals

Examples

1
2
3
4
5
6
7
res = getCases(city = c(330455), withdivision = FALSE) # Rio de Janeiro
# Rt original
rt<-Rtoriginal(obj = res, count = "casos", meangt=3)
plot(rt$Rt, type="l", xlab = "weeks", ylab = "Rt")
lines(rt$lwr,lty=3)
lines(rt$upr,lty=3)
abline(h = 1, col = 2)

claudia-codeco/AlertTools documentation built on Aug. 12, 2021, 9:58 a.m.