View source: R/cusum.transform.R
cusum.transform | R Documentation |
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.
cusum.transform(x)
x |
input matrix |
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).
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.
x <- matrix(rnorm(20),4,5) cusum.transform(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.