Learn R Programming

babsim.hospital (version 11.5.14)

extendRki: extendRki Erweiterung der RKI Daten

Description

Combine existing data with synthetic data

Usage

extendRki(
  data = getRkiData(babsim.hospital::rkidata),
  EndDate = max(data$Day) + 14,
  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

Run this code
# NOT RUN {
# take 10,000 data points only:
data <- getRkiData(babsim.hospital::rkidata[1:10000,])
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))

# }

Run the code above in your browser using DataLab