Learn R Programming

Rssa (version 0.13-1)

residuals: Obtain the residuals from SSA reconstruction

Description

Obtain the residuals from SSA reconstruction

Usage

"residuals"(object, groups, ..., cache = TRUE) "residuals"(object, ...)

Arguments

object
input object
groups
list of numeric vectors, indices of elementary components used for reconstruction, the entries of the list can be named.
...
further arguments passed to reconstruct routine
cache
logical, if 'TRUE' then intermediate results will be cached in the SSA object.

Value

residuals object

Details

This function calculates the residuals either from SSA object corresponding to reconstruction using groups arguments, or just extracts the residuals from reconstruction object.

See Also

Rssa for an overview of the package, as well as, reconstruct.

Examples

Run this code
# Decompose 'co2' series with default parameters
s <- ssa(co2)
# Reconstruct the series, grouping elementary series.
r <- reconstruct(s, groups = list(c(1, 4), c(2,3), c(5, 6)))
print(residuals(r))

Run the code above in your browser using DataLab