pvalues.clust {TSclust} | R Documentation |
Clustering Algorithm Based on p-values.
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
pvalues.clust(pvalues, significance)
Arguments
pvalues |
A |
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
Examples
## 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 )