circular.cc: circular.cc

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Cross-correlation with circular boundaries.

Usage

1

Arguments

x, y

numerical vector.

Value

The vector of cross-correlation between x and y at all possible lags.

Examples

1
2
3
4
5
6
7
# Same pattern shifted by 2 time units
x <- rep(c(0,1,2), 10)
y <- rep(c(2,0,1), 10)
xy.cc <- circular.cc(x, y)
plot(names(xy.cc),xy.cc, type="h",
xlab = "Lag", ylab = "Correlation")
abline(h = 0, lty = "dashed", col = "blue")

majpark21/TSexploreR documentation built on Oct. 16, 2019, 2:46 p.m.