powered by
Correlation calculation based on rolling window with overlapping observations.
ts.match(x, y, cutoff = 1)
Pearson's correlation coefficient between x and y
x
y
time series
subsection of the time series to map
benchmark value for corr, default 1
x <- rnorm(15) y <- -x[6:10] x <- c(x, y) ts.match(x, y, 1) z <- rnorm(5) ts.match(x, z)
Run the code above in your browser using DataLab