fftcor | R Documentation |
Compute auto and/or cross covariances and correlations via FFT.
fftcor(y, lag = NULL, isw = 4, plot = TRUE, lag_axis = TRUE)
y |
data of channel X and Y (data of channel Y is given for | ||||||
lag |
maximum lag. Default is | ||||||
isw |
numerical flag giving the type of computation.
| ||||||
plot |
logical. If | ||||||
lag_axis |
logical. If |
acov |
auto-covariance. |
ccov12 |
cross-covariance. |
ccov21 |
cross-covariance. |
acor |
auto-correlation. |
ccor12 |
cross-correlation. |
ccor21 |
cross-correlation. |
mean |
mean. |
H.Akaike and T.Nakagawa (1988) Statistical Analysis and Control of Dynamic Systems. Kluwer Academic publishers.
# Example 1
x <- rnorm(200)
y <- rnorm(200)
xy <- array(c(x,y), dim = c(200,2))
fftcor(xy, lag_axis = FALSE)
# Example 2
xorg <- rnorm(1003)
x <- matrix(0, nrow = 1000, ncol = 2)
x[, 1] <- xorg[1:1000]
x[, 2] <- xorg[4:1003] + 0.5*rnorm(1000)
fftcor(x, lag = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.