Learn R Programming

TSclust (version 1.1)

diss.COR: 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.

Value

  • The computed distance.

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 .

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.

See Also

diss.PACF, diss.ACF

Examples

Run this code
## 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
proxy::dist( rbind(x,y,z), diss.COR)

Run the code above in your browser using DataLab