| breaks_growth | R Documentation |
Estimation of breakpoints in linear regression models from daily infections data
breaks_growth(
y,
t,
ln = FALSE,
add_constant = 1,
alpha = 0.05,
...,
verbose = FALSE
)
y |
|
t |
|
ln |
|
add_constant |
Numeric constant to be added to y if zero values occur |
alpha |
Significance level |
... |
Other parameters passed to |
verbose |
|
This function allows detects breakpoints in a linear regression time series model.
The user must specify the dependent variable (daily infections) and the time variable (time counter or date values).
The estimation is performed using OLS.
The function internally uses the function breakpoints from the strucchange package (Zeileis et al. 2003),
where breakpoints are identified using the Bai-Perron algorithm (Bai & Perron 2003).
object of class breaksgrowth-class
Thomas Wieland
Bai J, Perron P (2003) Computation and analysis of multiple structural change models. Journal of Applied Econometrics 18(1), 1-22. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1002/jae.659")}
Wieland T (2020) A phenomenological approach to assessing the effectiveness of COVID-19 related nonpharmaceutical interventions in Germany. Safety Science 131, 104924. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1016/j.ssci.2020.104924")}
Zeileis C, Kleiber W, Krämer K, Hornik, K (2003) Testing and dating of structural changes in practice. Computational Statistics & Data Analysis 44(1-2), 109-123. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1016/S0167-9473(03)00030-6")}
exponential_growth, logistic_growth, hawkes_growth
data(Infections)
# Confirmed SARS-CoV-2 cases in Germany
breakpoints_infections <- breaks_growth(
y = Infections$infections_daily,
t = Infections$day,
ln = TRUE,
verbose = TRUE
)
# Breakpoints for time series of infections
summary(breakpoints_infections)
# Summary of breakpoints
plot(breakpoints_infections)
# Plot breakpoints
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.