pvalues.clust: Clustering Algorithm Based on p-values.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/diss.R

Description

Clustering algorithm based on p-values. Each group in the cluster solution is formed by series with associated p-values greater than a pre-specified level of significance.

Usage

1
pvalues.clust(pvalues, significance)

Arguments

pvalues

A dist object containing the p-values from testing the equality of each pair of time series under study.

significance

The significance level.

Details

Each element (i,j) in pvalues corresponds to the p-value obtained from checking whether or not the i-th and j-th series come from the same generating model. The clustering algorithm will only group together those series whose associated p-values are greater than the pre-specified significance level. The algorithm was originally developed for its use with the p-values obtained with in diss.AR.MAH (see Maharaj, 2000), but it can be applied to any similar test.

Value

An integer vector of length n, the number of observations, giving for each observation the number (id) of the cluster to which it belongs.

Author(s)

Pablo Montero Manso, José Antonio Vilar.

References

Maharaj E.A. (2000) Clusters of time series. J. Classification, 17(2), 297–314.

Montero, P and Vilar, J.A. (2014) TSclust: An R Package for Time Series Clustering. Journal of Statistical Software, 62(1), 1-43. http://www.jstatsoft.org/v62/i01/.

See Also

diss.AR.MAH

Examples

1
2
3
4
5
6
7
8
9
## Create three sample time series
x <- cumsum(rnorm(100))
y <- cumsum(rnorm(100))
z <- sin(seq(0, pi, length.out=100))
##

## Compute the distance and check for coherent results
dd <- diss( rbind(x,y,z), "AR.MAH")
pvalues.clust( dd$p_value, 0.05 )

TSclust documentation built on July 23, 2020, 1:07 a.m.