
Calculates the Linear Recurrence Relation given the one-dimensional 'ssa' object.
# S3 method for 1d.ssa
lrr(x, groups, reverse = FALSE, …, drop = TRUE)
# S3 method for toeplitz.ssa
lrr(x, groups, reverse = FALSE, …, drop = TRUE)
# S3 method for default
lrr(x, eps = sqrt(.Machine$double.eps),
reverse = FALSE, …, orthonormalize = TRUE)
# S3 method for lrr
roots(x, ..., method = c("companion", "polyroot"))
# S3 method for lrr
plot(x, ..., raw = FALSE)
SSA object holding the decomposition or matrix containing the basis vectors in columns
for lrr
call or 'lrr' object itself for other function calls
list, the grouping of eigentriples used to derive the LRR
logical, if 'TRUE', then LRR is assumed to go back
further arguments to be passed to decompose
or
plot
call, if necessary
logical, if 'TRUE' then the result is coerced to lrr object itself, when possible (length of 'groups' is one)
Tolerance for verticality checking
methods used for calculation of the polynomial roots: via eigenvalues
of companion matrix or R's standard polyroot
routine
logical, if 'TRUE' then plot
routine will not add any
additional plot components (e.g. unit circle)
logical, if 'FALSE' then the basis is assumed orthonormal. Otherwise, orthonormalization is performed
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.
Produces the linear recurrence relation from the series. The default implementation works as follows.
Denote by
For lrr.ssa
case the matrix
For reverse = 'TRUE'
everything is the same, besides the
last coordinate substituted for the first coordinate.
Rssa
for an overview of the package, as well as,
ssa
,
parestimate
,
# NOT RUN {
# 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)
# }
Run the code above in your browser using DataLab