diss.COR {TSclust} | R Documentation |
Correlation-based Dissimilarity
Description
Computes dissimilarities based on the estimated Pearson's correlation of two given time series.
Usage
diss.COR(x, y, beta = NULL)
Arguments
x |
Numeric vector containing the first of the two time series. |
y |
Numeric vector containing the second of the two time series. |
beta |
If not NULL, specifies the regulation of the convergence in the second method. |
Details
Two different measures of dissimilarity between two time series based on the estimated Pearson's correlation can be computed.
If beta
is not specified, the value d_1 = \sqrt{ 2 ( 1 - \rho) }
is computed, where (\rho)
denotes the Pearson's correlation between series x
and y
.
If beta
is specified, the function d_2 = \sqrt{ (\frac{ 1 - \rho}{ 1 + \rho})^\beta }
is used, where \beta
is beta
.
Value
The computed distance.
Author(s)
Pablo Montero Manso, José Antonio Vilar.
References
Golay, X., Kollias, S., Stoll, G., Meier, D., Valavanis, A., and Boesiger, P. (2005) A new correlation-based fuzzy logic clustering algorithm for FMRI. Magnetic Resonance in Medicine, 40.2, 249–260.
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
diss.COR(x, y)
diss.COR(x, z)
#create a dist object for its use with clustering functions like pam or hclust
diss( rbind(x,y,z), "COR")