Calculates the min-norm Linear Recurrence Relation given the one-dimensional 'ssa' object.
## 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 Ui the columns of matrix x. Denote by U~i the same vector Ui but without the last coordinate. Denote the last coordinate of Ui by πi. The returned value is
R=1−ν21i=1∑dπiU~i,
where
ν2=π12+⋯+πd2.
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.
Returns
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 parameterss <- ssa(co2, L =24)# Calculate the LRR out of first 3 eigentriplesl <- lrr(s, groups = list(1:3))# Calculate the roots of the LRRr <- roots(l)# Moduli of the rootsMod(r)# Periods of three roots with maximal moduli2*pi/Arg(r)[1:3]# Plot the rootsplot(l)