mosum.stat: MOSUM statistic

Description Usage Arguments Details Value

View source: R/mosum_stat.R

Description

Computes the statistical values for the MOSUM test for changes in the mean.

Usage

1
2
3
4
5
6
7
8
mosum.stat(
  x,
  G,
  G.right = NA,
  var.est.method = "mosum",
  var.custom = NULL,
  boundary.extension = TRUE
)

Arguments

x

input data (numeric vector or object of class ts)

G

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).

G.right

iff !is.na(G.right), the asymmetric bandwidth (G,G.right) will be used

var.est.method

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

var.custom

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

boundary.extension

a logical value indicating whether the boundary values should be filled-up with CUSUM values

Details

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.

Value

S3 mosum.stat object, which contains the following fields:

x

the numeric input vector provided

G.left,G.right

left and right bandwidths

var.est.method,var.custom,boundary.extension

input parameters

stat

a series of MOSUM statistic values; the first G and last G.right values are NA iff boundary.extension=FALSE

rollsums

a series of MOSUM detector values; equals stat*sqrt(var.estimation)

var.estimation

the local variance estimated according to var.est.method


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

Related to mosum.stat in mosum...