multiscale.localPrune {mosum} | R Documentation |
Multiscale MOSUM algorithm with localised pruning
Description
Multiscale MOSUM procedure with (possibly) assymetric bandwidths and localised pruning based on Schwarz criterion.
Usage
multiscale.localPrune(
x,
G = bandwidths.default(length(x)),
max.unbalance = 4,
threshold = c("critical.value", "custom")[1],
alpha = 0.1,
threshold.function = NULL,
criterion = c("eta", "epsilon")[1],
eta = 0.4,
epsilon = 0.2,
rule = c("pval", "jump")[1],
penalty = c("log", "polynomial")[1],
pen.exp = 1.01,
do.confint = FALSE,
level = 0.05,
N_reps = 1000,
...
)
Arguments
x |
input data (a |
G |
a vector of bandwidths, given as either integers less than |
max.unbalance |
a numeric value for the maximal ratio between maximal and minimal bandwidths to be used for candidate generation,
|
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 |
a numeric value for the significance level with
|
threshold.function |
function object of form |
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:
|
penalty |
string specifying the type of penalty term to be used in Schwarz criterion; possible values are:
|
pen.exp |
exponent for the penalty term (see |
do.confint |
flag indicating whether confidence intervals for change points should be computed |
level |
use iff |
N_reps |
use iff |
... |
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 |
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 (2022) Two-stage data segmentation permitting multiscale change points, heavy tails and dependence. Annals of the Institute of Statistical Mathematics, Volume 74, Number 4, pp. 653-684.
H. Cho and C. Kirch (2022) Bootstrap confidence intervals for multiple change points based on moving sum procedures. Computational Statistics & Data Analysis, Volume 175, pp. 107552.
Examples
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")