# multiscale.bottomUp: Multiscale MOSUM algorithm with bottom-up merging In mosum: Moving Sum Based Procedures for Changes in the Mean

## Description

Multiscale MOSUM procedure with symmetric bandwidths combined with bottom-up bandwidth-based merging.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12``` ```multiscale.bottomUp( x, G = bandwidths.default(length(x), G.min = max(20, ceiling(0.05 * length(x)))), threshold = c("critical.value", "custom"), alpha = 0.1, threshold.function = NULL, eta = 0.4, do.confint = FALSE, level = 0.05, N_reps = 1000, ... ) ```

## Arguments

 `x` input data (a `numeric` vector or an object of classes `ts` and `timeSeries`) `G` a vector of (symmetric) bandwidths, given as either integers less than `length(x)/2`, or numbers between `0` and `0.5` describing the moving sum bandwidths relative to `length(x)`. If the smallest bandwidth is smaller than `min(20, 0.05*length(x))` (`0.05` if relative bandwidths are given) and `threshold = "critical.value"`, it generates a warning message `threshold` string indicating which threshold should be used to determine significance. By default, it is chosen from the asymptotic distribution at the given significance level `alpha`. Alternatively, it is possible to parse a user-defined function with `threshold.function` `alpha` a numeric value for the significance level with `0 <= alpha <= 1`; use iff `threshold = "critical.value"` `threshold.function` function object of form `function(G, length(x), alpha)`, to compute a threshold of significance for different bandwidths G; use iff `threshold = "custom"` `eta` see mosum `do.confint` flag indicating whether to compute the confidence intervals for change points `level` use iff `do.confint = TRUE`; a numeric value (`0 <= level <= 1`) with which `100(1-level)%` confidence interval is generated `N_reps` use iff `do.confint = TRUE`; number of bootstrap replicates to be generated `...` further arguments to be passed to the mosum calls

## Details

See Algorithm 1 in the first referenced paper for a comprehensive description of the procedure and further details.

## Value

S3 object of class `multiscale.cpts`, which contains the following fields:

 `x` input data `cpts` estimated change points `cpts.info` data frame containing information about estimated change points `pooled.cpts` set of change point candidates that have been considered by the algorithm `G` bandwidths `threshold, alpha, threshold.function` input parameters `eta` input parameters `do.confint` input parameter `ci` object of class `cpts.ci` containing confidence intervals for change points iff `do.confint = TRUE`

## References

A. Meier, C. Kirch and H. Cho (2021) mosum: A Package for Moving Sums in Change-point Analysis. Journal of Statistical Software, Volume 97, Number 8, pp. 1-42. <doi:10.18637/jss.v097.i08>.

M. Messer et al. (2014) A multiple filter test for the detection of rate changes in renewal processes with varying variance. The Annals of Applied Statistics, Volume 8, Number 4, pp. 2027-2067.

H. Cho and C. Kirch (2021) Bootstrap confidence intervals for multiple change points based on moving sum procedures. arXiv preprint arXiv:2106.12844.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```x1 <- testData(lengths = c(100, 200, 300, 300), means = c(0, 1, 2, 2.7), sds = rep(1, 4), seed = 123)\$x mbu1 <- multiscale.bottomUp(x1) plot(mbu1) summary(mbu1) x2 <- testData(model = "mix", seed = 1234)\$x threshold.custom <- function(G, n, alpha) { mosum.criticalValue(n, G, G, alpha) * log(n/G)^0.1 } mbu2 <- multiscale.bottomUp(x2, G = 10:40, threshold = "custom", threshold.function = threshold.custom) plot(mbu2) summary(mbu2) ```

mosum documentation built on June 25, 2021, 5:08 p.m.