Description Usage Arguments Details Value Notes See Also Examples
iccf_core
returns the basic interpolated correlation coefficients.
1 |
t.1, x.1 |
time and value for time series 1 |
t.2, x.2 |
time and value for time series 2 |
tau |
(vector) list of lags at which to compute the CCF. |
local.est |
(logical) use 'local' (not 'global') means and variances? |
cov |
(logical) if |
The main loop for the ICCF. In this part we take time series 1, x.1
at
t.1
, pair them with values from time series 2, x.2
at
t.1-tau[i]
produce by linearly interpolating between the nearest
values of x.2
. At a given tau[i]
we sum the product of the
paired x.1
and x.2
values r[i] = (1/n) * sum(x.1 * x.2) /
(sd.1 * sd.2)
In the simplest case n
, sd.1
and sd.2
are
constant and are the number of pairs at lag=0
and the total
sqrt(var)
of each time series. If local.est = TRUE
then
n
, sd.1
and sd.2
are evaluated 'locally' i.e. they are
vary for each lag tau[i]
. In this case they are the number of good
pairs at lag tau[i]
, and the sqrt(vars)
of just the x.1
and x.2
data points involved. We assume x.1
and x.2
have
zero sample mean.
A list with components
r |
(array) A one dimensional array containing the correlation coefficients at each lag. |
n |
(array) A one dimensional array containing the number of pairs of points used at each lag. |
We assume that the input data x.1
and x.2
have been
mean-subtracted.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.