clusterify: Group Elementary Series Using W-correlation Matrix

Description Usage Arguments Details Value See Also Examples

Description

Group elemenatry series automatically via the hierarchical clustering with w-correlation matrix as a proximity matrix

Usage

1
2
## S3 method for class 'ssa'
grouping.auto.wcor(x, groups, nclust = length(groups) / 2, ...)

Arguments

x

SSA object

groups

list of numeric vectors, indices of elementary components used for reconstruction

nclust

integer, desired number of output series

...

further arguments passed to hclust

Details

Standard hclust routine is used to perform the grouping of the elementary components.

Value

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

See Also

hclust, wcor

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Decompose 'co2' series with default parameters
s <- ssa(co2)
# Form 3 series from the initial 6 ones:
lst <- grouping.auto(s, grouping.method = "wcor",
                     groups = 1:6, nclust=3)
# Automatic grouping:
print(lst)
plot(lst)
# Check separability
w <- wcor(s, groups = lst)
plot(w)

Example output

Loading required package: svd
Loading required package: forecast

Attaching package: 'Rssa'

The following object is masked from 'package:stats':

    decompose

$`1`
[1] 1 4

$`2`
[1] 2 3

$`3`
[1] 5 6

attr(,"hclust")

Call:
hclust(d = as.dist((1 - w)/2))

Cluster method   : complete 
Number of objects: 6 

attr(,"wcor")
             F1           F2           F3           F4           F5
F1 1.000000e+00 3.587609e-06 3.893247e-06 5.798656e-04 1.670659e-07
F2 3.587609e-06 1.000000e+00 9.991025e-01 6.711680e-04 3.082124e-04
F3 3.893247e-06 9.991025e-01 1.000000e+00 5.091794e-04 2.196507e-04
F4 5.798656e-04 6.711680e-04 5.091794e-04 1.000000e+00 9.857432e-05
F5 1.670659e-07 3.082124e-04 2.196507e-04 9.857432e-05 1.000000e+00
F6 1.630901e-07 4.239162e-04 1.227990e-04 6.242357e-05 9.995623e-01
             F6
F1 1.630901e-07
F2 4.239162e-04
F3 1.227990e-04
F4 6.242357e-05
F5 9.995623e-01
F6 1.000000e+00
attr(,"class")
[1] "wcor.matrix"
attr(,"class")
[1] "grouping.auto.wcor"

Rssa documentation built on Oct. 4, 2017, 5:06 p.m.