hankel: Apply Hankel operator to a time series

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

View source: R/ssa.R

Description

Computes trajectory matrix as a Hankel matrix.

Usage

1
hankel(x, L)

Arguments

x

time series

L

window length

Details

Calls C code to compute the Hankel matrix

Value

value

a matrix in Hankel form

Note

~~further notes~~

Author(s)

Patrick Crutcher

References

~put references to the literature/web site here ~

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function(x,L){
cc<-rep(0,L*L); T<-length(x)
cl<-.C("hankelC",
        as.double(x),
        as.double(cc),
        as.integer(L),
        as.integer(T))
return(matrix(cl[[2]],L,L))
  }

Example output

function (x, L) 
{
    cc <- rep(0, L * L)
    T <- length(x)
    cl <- .C("hankelC", as.double(x), as.double(cc), as.integer(L), 
        as.integer(T))
    return(matrix(cl[[2]], L, L))
}

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

Related to hankel in ssa...