growth_breaks: Time Series Model with Breakpoints for Regional Infections

growth_breaksR Documentation

Time Series Model with Breakpoints for Regional Infections

Description

Conducts N breakpoints analyses for infection time series in N regions.

Usage

growth_breaks(
  object,
  ln = FALSE,
  add_constant = 1,
  alpha = 0.05,
  verbose = FALSE
  )

Arguments

object

object of class infpan

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

verbose

bool argument which indicates whether progress messages are displayed

Details

The method detects breakpoints in regional infections time series based on an infpan object. 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). See breaks_growth for further details of the estimation.

Value

object of class growthmodels-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")}

Examples

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

infpan_CH <- load_infections_paneldata(
    data = COVID19Cases_geoRegion,
    col_cases = "entries",
    col_date = "datum",
    col_region = "geoRegion",
    other_cols = c("Population" = "pop"), 
    verbose = TRUE
  )
# Import as infections panel data set (class infpan)

CH_covidwave1_breaks <- 
  growth_breaks(infpan_CH)
summary(CH_covidwave1_breaks)
# Breakpoints for infpan object infpan_CH 

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