Learn R Programming

Rssa (version 0.11)

clusterify: Automatic Grouping of the Elementary Components

Description

Try to perform the grouping step of the SSA via clusterization.

Usage

## S3 method for class 'ssa':
clusterify(x, group, nclust = length(group) / 2,
           ...,
           type = c("wcor"), cache = TRUE)

Arguments

x
SSA object
group
list of numeric vectors, indices of elementary components used for reconstruction
nclust
integer, desired number of output objects
...
further arguments passed to clusterization methods
type
algorithm of clusterization, see 'Details' for more info
cache
logical, if 'TRUE' then the results of the intermediate calculations are saved and reused as much as possible

Value

  • List of integer vectors holding the indices of the elementary components forming each grouped objects

Details

Right now the only clusterization method is supported: use of w-correlation matrix as the dissimilarity matrix. Standard hclust routine is used to perform the grouping of the elementary components.

See Also

hclust, wcor

Examples

Run this code
# Decompose 'co2' series with default parameters
s <- ssa(co2)
# Form 3 series from the initial 6 ones:
lst <- clusterify(s, group = 1:6, nclust=3)
# Automatic grouping:
print(lst)
# Check separability
w <- wcor(s, groups = lst)
plot(w)

Run the code above in your browser using DataLab