extendRki: extendRki Erweiterung der RKI Daten

View source: R/extendRki.R

extendRkiR Documentation

extendRki Erweiterung der RKI Daten

Description

Combine existing data with synthetic data

Usage

extendRki(
  data = getRkiData(babsim.hospital::rkidata),
  EndDate = max(data$Day) + 28,
  R0 = c(1, 1),
  tau = 5
)

Arguments

data

rki data, e.g., getRkiData(babsim.hospital::rkidata)

EndDate

Ende (Tag), e.g., '2020-05-04'

R0

Basisreproduktionszahl. Constant, if a scalar value is given. If a vector of two values are given, they will be interpreted as a start and an end value, respectively. c(1,2) defines an increasing R0 value from 1 to 2. Default: 1, i.e., constant 1. Note: This is NOT exactly the same R0 value presented by the Robert-Koch Institute, please refer to https://en.wikipedia.org/wiki/Basic_reproduction_number for our implementation.

tau

Ansteckungszeitraum in Tagen

See Also

getRkiData

Examples

# take 10,000 data points only:
data <- getRkiData(babsim.hospital::rkidata[1:10000, ])
# check whether enough data are provided
if (dim(data)[1] > 1e6){
n <- as.integer(max(data$Day) - min(data$Day))
StartDay <- min(data$Day) + round(n * 0.995)
data <- data[which(data$Day >= StartDay), ]
EndDate <- max(data$Day) + 2
dataExt <- extendRki(
  data = data,
  EndDate = EndDate,
  R0 = c(0.1, 0.2)
)
}

babsim.hospital documentation built on May 30, 2022, 9:05 a.m.