Learn R Programming

Rssa (version 0.13-1)

wnorm: Calculate Weighted Norm of series

Description

Function calculates the W-norm for input objects or for objects stored in input ssa obect.

Usage

"wnorm"(x, ...) "wnorm"(x, ...) "wnorm"(x, ...) "wnorm"(x, ...) "wnorm"(x, L = (N + 1) %/% 2, ...) "wnorm"(x, L = (N + 1) %/% 2, ...)

Arguments

x
the input object. This might be ssa object for ssa method, or just a series.
L
window length.
...
arguments to be passed to methods.

Details

L-weighted norm of series is Frobenius norm of its L-trajectory matrix. So, if x is vector (series), the result of wnorm(x, L) is equal to sqrt(sum(hankel(x, L)^2), but in fact is calculated much more efficiently. For 1d SSA and Toeplitz SSA wnorm(x) calculates weighted norm for stored original input series and stored window length.

L-weighted norm of 2d array is Frobenius norm of its L[1] * L[2]-trajectory hankel-block-hankel matrix. For 2d SSA this method calculates weighted norm for stored original input array and stored 2d-window lengths.

References

Golyandina, N., Nekrutkin, V. and Zhigljavsky, A. (2001): Analysis of Time Series Structure: SSA and related techniques. Chapman and Hall/CRC. ISBN 1584881941

See Also

ssa-input, hankel, wcor

Examples

Run this code
wnorm(co2, 20)
# Construct ssa-object for 'co2' with default parameters but don't decompose
ss <- ssa(co2, force.decompose = FALSE)
wnorm(ss)

# Artificial image for 2D SSA

mx <- outer(1:50, 1:50,
            function(i, j) sin(2*pi * i/17) * cos(2*pi * j/7) + exp(i/25 - j/20)) +
      rnorm(50^2, sd = 0.1)
# Construct ssa-object for 'mx' with default parameters but don't decompose
s <- ssa(mx, kind = "2d-ssa", force.decompose = FALSE)
wnorm(s)

Run the code above in your browser using DataLab