Discrete wavelet covariance estimation.

USAGE:

wavCovariance( x, y, wavelet = "s8", n.levels = 4, lag = c(10,20,30,40) )

DESCRIPTION:

Calculates the time (in)dependent, (un)biased, (un)lagged discrete wavelet covariance of two time series using either DWT or MODWT wavelet transform coefficients.

REQUIRED ARGUMENTS:

x
A vector containing a uniformly-sampled real-valued time series.
y
A vector containing a uniformly-sampled real-valued time series.

OPTIONAL ARGUMENTS:

transform
A character string denoting the type of wavelet transform: ``modwt" or ``dwt". Default: ``modwt".
wavelet
A character string denoting the filter type. See wavDaubechies for details. Default: ``s8".
n.levels
The number of decomposition levels. Default: the maximum level at which there exists at least one interior wavelet coefficient.
lag
an integer denoting the time lag to be used on the series (represented by) x or y when calculating the covariance estimates at a given scale. The lag is used to study the covariance between wavelet subband processes whose events are assumed to be correlated at different times. The wavelet coefficients for y are circularly shifted by lag and the product of these shifted coefficients with the wavelet coefficients of x at the corresponding scale are used to form the wavelet covariance estimates. If lag is a vector, the j'th level y wavelet coefficients are lagged by the j'th element of lag. If the number of elements in lag is less than the number of wavelet decomposition scales, the highest scale lag is repeated for the remaining scales. Finally, lag may contain positive or negative integers, with negative lags representing an advance (or circular permutation to the left) of the wavelet coefficients. The lag used. Default: 0.
sampling.interval
The sampling interval of the time series. Default: 1.

VALUE:

result
An object of class WaveletCovariance.

REFERENCES:

(1) D. B. Percival and A. T. Walden, ``Wavelet Methods for Time Series Analysis'', Cambridge University Press, 2000.

SEE ALSO:

.

EXAMPLES:

   ## create second data set, with the first
   ## being the sunspots series
   revsun <- rev(sunspots)

   ## calculate the wavelet covariance of the sunspots
   ## series with a reversed sunspots series
   xcov <- wavCovariance(sunspots, revsun)

   ## plot the results
   plot(xcov)

   ## plot the wavelet covariance coefficients
   ## shifted for approximate zero phase to align
   ## them with events in the original time series
   plot(xcov, shift = T)

   ## perform a lagged wavelet covariance estimation
   ## using the same lag for all scales
   xcov <- wavCovariance(sunspots, revsun, lag = 20)

   ## perform a lagged wavelet covariance estimation
   ## using different lags for for different scales
   xcov <- wavCovariance(sunspots, revsun,
   + lag = c(20, 30, 40))
   print(xcov$lag)