ssa_w_cor: w-correlation

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/ssa.R

Description

Computes w - correlations (Golyandina, et.al. 2001) from a matrix containing reconstructed components in its columns.

Usage

1
ssa_w_cor(z, l, k)

Arguments

z

A matrix containing reconstructed components in its columns.

l

An integer for the window width

k

An integer defined by k=t-l+1

Details

w-correlations can be used to assess how well reconstructed components can be separated from each other. See reference for more details.

Value

A square matrix containing the w-correlations between components.

Note

~~further notes~~

Author(s)

Patrick Crutcher

References

Golyandina, N.; Nekrutkin, V. & Zhiglkilavskifi, A. Analysis of Time Series Structure: SSA and Related Techniques. CRC Press, 2001

See Also

~~objects to See Also as help, ~~~

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#x <- sin(seq(0,10*pi,len=200))
#x <- x + rnorm(x)/2
#x.wc <- w.cor(x.rc,40)
#image(x.wc,col=gray(100:0/100))

## The function is currently defined as
function(z,l,k) {
    ls<-min(l,k); ks<-max(l,k)
    n<-nrow(z); w<-rep(ls,n)
    w[1:ls]<-1:ls; w[(ks+1):n]<-n-(ks:(n-1))                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
    c<-crossprod(z,w*z); d<-diag(c)
    return(c/sqrt(outer(d,d)))
  }

ssa documentation built on May 2, 2019, 5:54 p.m.

Related to ssa_w_cor in ssa...