breaks_growth: Time Series Model with Breakpoints

breaks_growthR Documentation

Time Series Model with Breakpoints

Description

Estimation of breakpoints in linear regression models from daily infections data

Usage

breaks_growth(
  y, 
  t,
  ln = FALSE,
  add_constant = 1,
  alpha = 0.05,
  ...,
  verbose = FALSE
  )

Arguments

y

numeric vector with cumulative infections data over time

t

vector of class numeric or Date with time points or dates

ln

bool argument which indicates whether dependent variable should be transformed by natural logarithm

add_constant

Numeric constant to be added to y if zero values occur

alpha

Significance level \alpha for 1-\alpha*100 confidence intervals

...

Other parameters passed to strucchange::breakpoints (see the corresponding documentation)

verbose

bool argument which indicates whether progress messages are displayed

Details

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).

Value

object of class breaksgrowth-class

Author(s)

Thomas Wieland

References

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")}

See Also

exponential_growth, logistic_growth, hawkes_growth

Examples

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

swash documentation built on April 7, 2026, 1:06 a.m.