data(COVID19Cases_geoRegion)
# Get SWISS COVID19 cases at NUTS 3 level
COVID19Cases_geoRegion <-
COVID19Cases_geoRegion[!COVID19Cases_geoRegion$geoRegion %in% c("CH", "CHFL"),]
# Exclude CH = Switzerland total and CHFL = Switzerland and Liechtenstein total
COVID19Cases_geoRegion <-
COVID19Cases_geoRegion[COVID19Cases_geoRegion$datum <= "2020-05-31",]
# Extract first COVID-19 wave
COVID19Cases_BS <-
COVID19Cases_geoRegion[(COVID19Cases_geoRegion$geoRegion == "ZH")
& (COVID19Cases_geoRegion$sumTotal > 0),]
# COVID cases for Zurich
loggrowth_BS <- logistic_growth (
y = as.numeric(COVID19Cases_BS$sumTotal),
t = COVID19Cases_BS$datum,
S = 5557,
S_start = NULL,
S_end = NULL,
S_iterations = 10,
S_start_est_method = "bisect",
seq_by = 10,
nls = TRUE
)
# Logistic growth model with stated saturation value
summary(loggrowth_BS)
# Summary of logistic growth model
plot(loggrowth_BS)
# Plot of logistic growth model
Run the code above in your browser using DataLab