# multiscale.localPrune: Multiscale MOSUM algorithm with localised pruning In mosum: Moving Sum Based Procedures for Changes in the Mean

## Description

Multiscale MOSUM procedure with (possibly) assymetric bandwidths and localised pruning based on Schwarz criterion.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18``` ```multiscale.localPrune( x, G = bandwidths.default(length(x)), max.unbalance = 4, threshold = c("critical.value", "custom"), alpha = 0.1, threshold.function = NULL, criterion = c("eta", "epsilon"), eta = 0.4, epsilon = 0.2, rule = c("pval", "jump"), penalty = c("log", "polynomial"), pen.exp = 1.01, 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 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)`. Asymmetric bandwidths obtained as the Cartesian product of the set `G` with itself are used for change point analysis `max.unbalance` a numeric value for the maximal ratio between maximal and minimal bandwidths to be used for candidate generation, `1 <= max.unbalance <= Inf` `threshold` string indicating which threshold should be used to determine significance. By default, it is chosen from the asymptotic distribution at the 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_l, G_r, length(x), alpha)`, to compute a threshold of significance for different bandwidths `(G_l, G_r)`; use iff `threshold = "custom"` `criterion` how to determine whether an exceeding point is a change point; to be parsed to mosum `eta, epsilon` see mosum `rule` string for the choice of sorting criterion for change point candidates in merging step. Possible values are: `"pval"`smallest p-value `"jump"`largest (rescaled) jump size `penalty` string specifying the type of penalty term to be used in Schwarz criterion; possible values are: `"log"`use `penalty = log(length(x))^pen.exp` `"polynomial"`use `penalty = length(x)^pen.exp` `pen.exp` exponent for the penalty term (see `penalty`); `do.confint` flag indicating whether confidence intervals for change points should be computed `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 parsed to mosum calls

## Details

See Algorithm 2 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 `sc` Schwarz criterion values of the estimated change point set `pooled.cpts` set of change point candidates that have been considered by the algorithm `G` input parameter `threshold, alpha, threshold.function` input parameters `criterion, eta, epsilon` input parameters `rule, penalty, pen.exp` 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>.

H. Cho and C. Kirch (2020) Two-stage data segmentation permitting multiscale change points, heavy tails and dependence. arXiv preprint arXiv:1910.12486.

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``` ```x <- testData(model = "mix", seed = 123)\$x mlp <- multiscale.localPrune(x, G = c(8, 15, 30, 70), do.confint = TRUE) print(mlp) summary(mlp) par(mfcol=c(2, 1), mar = c(2, 4, 2, 2)) plot(mlp, display = "data", shaded = "none") plot(mlp, display = "significance", shaded = "CI", CI = "unif") ```

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