| Type: | Package | 
| Title: | Multiscale Change Point Detection via Gradual Bandwidth Adjustment in Moving Sum Processes | 
| Version: | 1.0 | 
| Date: | 2021-02-19 | 
| Maintainer: | Michael Messer <michael.messer@tuwien.ac.at> | 
| Description: | Multiscale moving sum procedure for the detection of changes in expectation in univariate sequences. References - Multiscale change point detection via gradual bandwidth adjustment in moving sum processes (2021+), Tijana Levajkovic and Michael Messer. | 
| License: | GPL-3 | 
| RoxygenNote: | 7.1.1 | 
| NeedsCompilation: | no | 
| Packaged: | 2021-02-23 11:13:14 UTC; messer | 
| Author: | Tijana Levajkovic [aut], Michael Messer [aut, cre] | 
| Repository: | CRAN | 
| Date/Publication: | 2021-02-24 10:10:02 UTC | 
mscp
Description
Multiscale change point detection via gradual bandwidth adjustment in moving sum processes. A method for the detection of changes in the expectation in univariate sequences.
Usage
mscp(x, delta = 20, g = 20, kappa = NA, alpha = 0.01, sim = 500)
Arguments
x | 
 numeric vector. Input sequence of random variables.  | 
delta | 
 integer >=2. Default = 20. Minimal window considered.  | 
g | 
 integer >=1. Default = 20. Spacing between starting points.  | 
kappa | 
 NA or positive real number. Default = NA. Breaking threshold. If NA, then kappa is derived in simulations, using alpha and sim  | 
alpha | 
 numeric in (0,1). Default = 0.01. Significance level, i.e., sets kappa as (1-alpha)-quantile of maximum of Gaussian process limit.  | 
sim | 
 integer >=1. Default = 500. Number of simulations for kappa.  | 
Value
invisible list
cp | 
 detected change points (ordered according to detection)  | 
mean_sd | 
 matrix of estimated means and standard deviations  | 
path | 
 list containing matrices, each matrix describing the path of a detected change point. First column: t-value, second column: h-value, third column: D-value (statistic), first row: starting values, last row: end values  | 
S | 
 matrix of possible starting values. First column: t-value, second column: h-value, third column: D-value (statistic), fourth column: step when cut out  | 
x | 
 input sequence  | 
delta | 
 minimal window size  | 
g | 
 spacing between starting points  | 
kappa | 
 threshold  | 
Author(s)
Tijana Levajkovic and Michael Messer
References
Multiscale change point detection via gradual bandwidth adjustment in moving sum processes (2021+), Tijana Levajkovic and Michael Messer
See Also
Examples
set.seed(1)
Tt <- 1000
cp <- c(250,500,600,650,750)
mu <- c(2,3,6,9,12,15)
sd <- c(1,1,2,1,2,1)
m  <- rep(mu,diff(c(0,cp,Tt))) 
s  <- rep(sd,diff(c(0,cp,Tt)))    
x  <- rnorm(Tt,m,s)
result <- mscp(x,kappa=4.77) # kappa set manually
# result <- mscp(x) # kappa derived in simulations
summary(result)
plot(result)
plot.mscp
Description
Plot method for class 'mscp'
Usage
## S3 method for class 'mscp'
plot(x = x, cex = 1, plot.legend = TRUE, ...)
Arguments
x | 
 object of class mscp  | 
cex | 
 numeric, global sizes in plot  | 
plot.legend | 
 logical, if TRUE legends are plotted  | 
... | 
 additional arguments  | 
Value
No return value, called for side effects
Author(s)
Tijana Levajkovic and Michael Messer
References
Multiscale change point detection via gradual bandwidth adjustment in moving sum processes (2021+), Tijana Levajkovic and Michael Messer
See Also
Examples
set.seed(1)
Tt <- 1000
cp <- c(250,500,600,650,750)
mu <- c(2,3,6,9,12,15)
sd <- c(1,1,2,1,2,1)
m  <- rep(mu,diff(c(0,cp,Tt))) 
s  <- rep(sd,diff(c(0,cp,Tt)))    
x  <- rnorm(Tt,m,s)
result <- mscp(x,kappa=4.77) # kappa set manually
# result <- mscp(x) # kappa derived in simulations
summary(result)
plot(result)
summary.mscp
Description
Summary method for class 'mscp'
Usage
## S3 method for class 'mscp'
summary(object, ...)
Arguments
object | 
 object of class mscp  | 
... | 
 additional arguments  | 
Value
No return value, called for side effects
Author(s)
Tijana Levajkovic and Michael Messer
References
Multiscale change point detection via gradual bandwidth adjustment in moving sum processes (2021+), Tijana Levajkovic and Michael Messer
See Also
Examples
set.seed(1)
Tt <- 1000
cp <- c(250,500,600,650,750)
mu <- c(2,3,6,9,12,15)
sd <- c(1,1,2,1,2,1)
m  <- rep(mu,diff(c(0,cp,Tt))) 
s  <- rep(sd,diff(c(0,cp,Tt)))    
x  <- rnorm(Tt,m,s)
result <- mscp(x,kappa=4.77) # kappa set manually
# result <- mscp(x) # kappa derived in simulations
summary(result)
plot(result)