cusum.transform: CUSUM transformation

View source: R/cusum.transform.R

cusum.transformR Documentation

CUSUM transformation

Description

Performing CUSUM transformation to the input matrix of multivariate time series. If the input is a vector, it is treated as a matrix of one row.

Usage

cusum.transform(x)

Arguments

x

input matrix

Details

For any integers p and n, the CUSUM transformation T_{p,n}: R^{p\times n}\to R^{p\times (n-1)} is defined by

[T_{p,n}(M)]_{j,t} := √{t(n-t)/n}\biggl(\frac{1}{n-t}∑_{r=t+1}^n M_{j,r} - \frac{1}{t}∑_{r=1}^t M_{j,r}\biggr).

Value

The transformed matrix is returned. Note that the returned matrix has the same number of rows but one fewer columns compared with the input matrix.

Examples

x <- matrix(rnorm(20),4,5)
cusum.transform(x)

InspectChangepoint documentation built on May 3, 2022, 9:07 a.m.