| logistic_growth | R Documentation |
Estimation of logistic growth models from cumulative infections data, linearized OLS and/or NLS
logistic_growth(
y,
t,
S = NULL,
S_start = NULL,
S_end = NULL,
S_iterations = 10,
S_start_est_method = "bisect",
seq_by = 10,
plot_trial_and_error = TRUE,
nls = TRUE,
impute_missing_values = FALSE,
add_constant = 1,
verbose = FALSE
)
y |
|
t |
|
S |
Saturation value for the model |
S_start |
Start value of the saturation value for estimation |
S_end |
End value of the saturation value for estimation |
S_iterations |
Number of iterations for saturation value search |
S_start_est_method |
Method for saturation value search, either "bisect" or "trial_and_error" |
seq_by |
No of segments for the "trial_and_error" estimation of the saturation value |
plot_trial_and_error |
|
nls |
Nonlinear estimation? |
impute_missing_values |
|
add_constant |
Numeric constant to be added to y if zero values occur (only relevant for OLS estimation) |
verbose |
|
This function allows the estimation of a logistic growth model. The user must specify the dependent variable (cumulative infections) and the time variable (time counter or date values). The estimation is performed using a linearized model with an OLS estimator and nonlinear least squares. For the former, the saturation value can either be specified by the user or found using a search algorithm. The parameters from the OLS fit are used as starting values for the NLS estimation. See Rawlings et al. (1998) for the basics of intrinsically linear models such as the logistic or exponential growth model. See Wieland (2020) for the documentation of the fitting procedure applied in this function.
object of class loggrowth-class
Thomas Wieland
Chowell G, Simonsen L, Viboud C, Yang K (2014) Is West Africa Approaching a Catastrophic Phase or is the 2014 Ebola Epidemic Slowing Down? Different Models Yield Different Answers for Liberia. PLoS currents 6. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://dx.doi.org/10.1371/currents.outbreaks.b4690859d91684da963dc40e00f3da81")}
Pell B, Kuang Y, Viboud C, Chowell G (2018) Using phenomenological models for forecasting the 2015 ebola challenge. Epidemics 22, 62-70. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1016/j.epidem.2016.11.002")}
Rawlings JO, Pantula SG, Dickey DA (1998) Applied Regression Analysis: A Research Tool. Second Edition. New York: Springer. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1007/b98890")}
Wieland T (2020) Flatten the Curve! Modeling SARS-CoV-2/COVID-19 Growth in Germany at the County Level. REGION 7(2), 43–83. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.18335/region.v7i2.324")}
loggrowth-class, growth, exponential_growth
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.