lrr: Calculate the min-norm Linear Recurrence Relation

View source: R/forecast.R

lrrR Documentation

Calculate the min-norm Linear Recurrence Relation

Description

Calculates the min-norm Linear Recurrence Relation given the one-dimensional 'ssa' object.

Usage

## S3 method for class '1d.ssa'
lrr(x, groups, reverse = FALSE, ..., drop = TRUE)
## S3 method for class 'toeplitz.ssa'
lrr(x, groups, reverse = FALSE, ..., drop = TRUE)
## Default S3 method:
lrr(x, eps = sqrt(.Machine$double.eps),
        reverse = FALSE, ..., orthonormalize = TRUE)
## S3 method for class 'lrr'
roots(x, ..., method = c("companion", "polyroot"))
## S3 method for class 'lrr'
plot(x, ..., raw = FALSE)

Arguments

x

SSA object holding the decomposition or matrix containing the basis vectors in columns for lrr call or 'lrr' object itself for other function calls

groups

list, the grouping of eigentriples used to derive the LRR

reverse

logical, if 'TRUE', then LRR is assumed to go back

...

further arguments to be passed to decompose or plot call, if necessary

drop

logical, if 'TRUE' then the result is coerced to lrr object itself, when possible (length of 'groups' is one)

eps

Tolerance for verticality checking

method

methods used for calculation of the polynomial roots: via eigenvalues of companion matrix or R's standard polyroot routine

raw

logical, if 'TRUE' then plot routine will not add any additional plot components (e.g. unit circle)

orthonormalize

logical, if 'FALSE' then the basis is assumed orthonormal. Otherwise, orthonormalization is performed

Details

Produces the min-norm linear recurrence relation from the series. The default implementation works as follows.

Denote by U_i the columns of matrix x. Denote by \tilde{U}_{i} the same vector U_i but without the last coordinate. Denote the last coordinate of U_i by \pi_i. The returned value is

\mathcal{R} = \frac{1}{1-\nu^2}\sum_{i=1}^{d}{\pi_i \tilde{U}_{i}},

where

\nu^2 = \pi_1^2 + \dots + \pi_d^2.

For lrr.ssa case the matrix U used is the matrix of basis vector corresponding to the selected elementary series.

For reverse = 'TRUE' everything is the same, besides the last coordinate substituted for the first coordinate.

Details of the used algorithm see in Golyandina et al (2018), Algorithms 3.1 and 3.2.

Value

Named list of object of class 'lrr' for lrr function call, where elements have the same names as elements of groups (if group is unnamed, corresponding component gets name ‘Fn’, where ‘n’ is its index in groups list). Or the object itself if 'drop = TRUE' and groups has length one.

Vector with the roots of the of the characteristic polynomial of the LRR for roots function call. Roots are ordered by moduli decreasing.

References

Golyandina N., Korobeynikov A., Zhigljavsky A. (2018): Singular Spectrum Analysis with R. Use R!. Springer, Berlin, Heidelberg.

See Also

Rssa for an overview of the package, as well as, ssa, parestimate,

Examples

# Decompose 'co2' series with default parameters
s <- ssa(co2, L = 24)
# Calculate the LRR out of first 3 eigentriples
l <- lrr(s, groups = list(1:3))
# Calculate the roots of the LRR
r <- roots(l)
# Moduli of the roots
Mod(r)
# Periods of three roots with maximal moduli
2*pi/Arg(r)[1:3]
# Plot the roots
plot(l)

Rssa documentation built on Sept. 11, 2024, 7:20 p.m.