README.md

backCUSUM

The goal of backCUSUM is to provide functionality to apply the methods developed in the paper “Backward CUSUM for Testing and Monitoring Structural Change with an Application to COVID-19 Pandemic Data” by Sven Otto and Jörg Breitung. The repository also provides code to replicate all simulation results in this paper.

Paper: https://doi.org/10.1017/S0266466622000159

Preprint: https://arxiv.org/abs/2003.02682

Installation

You can install the package using the following command:

library(remotes)
install_github("ottosven/backCUSUM")

Example

This is a basic example:

library(backCUSUM)
T <- 100
breakpoint <- floor(3*T/4)
beta1 = 0
beta2 = 1
u <- rnorm(T,0,1)
y <- c(rep(beta1,breakpoint), rep(beta2,T-breakpoint)) + u
Q.test(y~1)
BQ.test(y~1)
SBQ.test(y~1)
get.recresid(y~1)


ottosven/backCUSUM documentation built on April 12, 2022, 10:59 p.m.