ssa-object {Rssa} | R Documentation |
Properties of SSA object
Description
Functions to access various fields of SSA object, query for number of singular values, eigenvectors, factor vectors and ‘special’ decomposition triples (now, ProjectionSSA triples) in the SSA object and other miscellaneous info. See Chapter 1 in Golyandina et al (2018) for explanation.
Usage
nsigma(x)
nu(x)
nv(x)
## S3 method for class 'ssa'
nspecial(x)
## S3 method for class 'ssa'
summary(object, digits = max(3, getOption("digits") - 3), ...)
## S3 method for class 'ssa'
x$name
Arguments
x |
SSA object to query |
object |
an object for which a summary is desired |
digits |
integer, used for number formatting |
... |
additional arguments affecting the summary produced |
name |
field of SSA object to extract. See 'Details' for list of the fields |
Details
The internals of SSA object is inheritely opaque, because depending on the selected SVD method and other conditions it might contains different fields.
However, it is possible to extract some fields out of it using the
operator $
, in particular, the following values of argument
name
are supported:
- sigma
Vector of singular values
- U
The matrix of eigenvectors
- V
The matrix of factor vectors. Might not exist depending on the selected SVD method
If SSA with projections is being performed, then the eigentriples are ordered as follows:
at first, row projection triples, then column projection triples and then
SVD-triples. Non-SVD triples (like projection triples) are called ‘special triples’.
The number of special triples can be obtained by calling nspecial
method.
Also, one can use the following fields of the SSA object:
- nPR
the number of row projection triples, may be NULL
- nPL
the number of column projection triples, may be NULL
Value
an 'integer' of length 1 for nu
, nv
, nsigma
,
nspecial
routines, matrix or vector for $
operator.
About decompositions
The result of Decomposition step of SSA and its modifications can be written down in the following form:
where is the trajectory matrix,
,
,
are non-negative numbers.
Also, we assume that
,
.
The Singular Value Decomposition is a particular case of and corresponds to orthonormal systems of
and
.
We call
eigentriple,
are singular values,
are left singular values or eigenvectors,
are right singular vectors or factor vectors, by analogy with the SVD.
For the most of SSA decompositions, belongs to the column space of
,
while
belongs to the row space of
.
Therefore, let us consider such decompositions called consistent.
Note that is a decomposition of
into a sum of rank-one matrices.
If the systems
and
are linearly-independent,
then the decomposition
is minimal (has minimal possible number of addends).
If at least one of the systems is not linear independent,
the decomposition is not minimal.
If both
and
are orthonormal,
then the decomposition
is called bi-orthogonal.
If
is orthonormal, the decomposition is called left-orthogonal;
If
is orthonormal, the decomposition is called right-orthogonal.
Let be rank of
. Minimal decomposition has exactly
addends.
Introduce the Frobenius-inner product as
.
Thus, we can say about F-orthogonality and F-orthogonal decompositions if
are F-orthogonal. For F-orthogonality, left or right orthogonality is sufficient.
Generally, can be not equal to
.
For F-orthogonal decompositions,
.
The contribution of k-th matrix component is defined as
.
For F-orthogonal decompositions, the sum of component contributions is equal to 1. Otherwise, this sum can considerably differ from 1 (e.g., the sum of component contributions can be 90% or 146%).
Remark. If the system (or
) has vectors
that do not belong to the column (or row) spaces, then the decomposition can be not minimal even
if
(or
) are linearly independent,
since these projections on the column (or row) space can be dependent.
Decompositions for different SSA modifications
- Basic SSA
the SVD, consistent, minimal, bi-orthogonal and therefore F-orthogonal decomposition. Implemented in
ssa
withkind='1d-ssa'
- FOSSA
consistent, minimal F-orthogonal decomposition. Implemented in
fossa
- IOSSA
consistent, minimal oblique decomposition. Implemented in
iossa
- SSA with projections
non-consistent if at least one basis vector used for the projection does not belong to the column (row) trajectory space, F-orthogonal decomposition. The components, which are obtained by projections, are located at the beginning of the decomposition and have numbers
. Implemented in
ssa
withkind='1d-ssa'
and non-NULL
row.projector
orcolumn.projector
arguments- Toeplitz SSA
generally, non-consistent, non-minimal F-orthogonal decomposition. Implemented in
ssa
withkind='toeplitz-ssa'
Note
For nsigma
, nu
, nv
, $
routines, the
values returned solely depend on used singular value decomposition
method and parameters of this method (e.g. 'neig' argument for
'propack' and 'nutrlan' SVD methods).
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
,
calc.v
,
iossa
,
fossa
,
Examples
# Decompose 'co2' series with default parameters
s <- ssa(co2, neig = 20)
# Show the number of eigentriples saved in the 's'
print(nsigma(s))
# Show the summary
summary(s)
# Show the set of singular values
print(s$sigma)
# Show the first eigenvector
print(s$U[, 1])
# Decompose `co2' series with polynomial projections
s <- ssa(co2, row.projector = 1, column.projector = 2)
print(nspecial(s))
print(c(s$nPL, s$nPR))
# Reconstruct a polynomial trend
plot(reconstruct(s, groups = list(trend = seq_len(nspecial(s)))))