Computes the statistical values for the MOSUM test for changes in the mean.
mosum.stat(
x,
G,
G.right = NA,
var.est.method = "mosum",
var.custom = NULL,
boundary.extension = TRUE
)S3 mosum.stat object, which contains the following fields:
the numeric input vector provided
left and right bandwidths
input parameters
a series of MOSUM statistic values; the first G and last G.right values are NA iff boundary.extension=FALSE
a series of MOSUM detector values; equals stat*sqrt(var.estimation)
the local variance estimated according to var.est.method
input data (numeric vector or object of class ts)
an integer value for the length of the moving sum window;
G should be less than length(n)/2.
Alternatively a number between 0 and 0.5 describing the moving sum bandwidth
relative to length(x).
iff !is.na(G.right), the asymmetric bandwidth (G,G.right) will be used
how the variance is estimated; possible values are
'custom'a vector of length(x) is to be parsed by the user; use var.custom in this case to to so
'mosum'both-sided MOSUM variance estimator
'mosum.min'minimum of the sample variance estimates from the left and right summation windows
'mosum.max'maximum of the sample variance estimates from the left and right summation windows
a numeric vector (of the same length as x) containing
local estimates of the variance or long run variance; use iff var.est.method=custom
a logical value indicating whether the boundary values should be filled-up with CUSUM values
This class only contains the values for the MOSUM statistic. For statistical evaluation and change point extraction, use mosum. See also multiscale.bottomUp and multiscale.localPrune.