Learn R Programming

costat (version 1.1-1)

ewcrossspec: Compute evolutionary wavelet cross spectrum from two series.

Description

Compute evolutionary wavelet cross spectrum from two series. Like the regular evolutionary wavelet spectrum, but indicates the joint simultaneous power in both series at a given time and scale. This is the quantity $$L_j^{XY}(z)$$ at the end of section 2 of Cardinali and Nason (2008.)

Usage

ewcrossspec(x, y, filter.number = 10, family = "DaubLeAsymm", WPsmooth = TRUE, verbose = FALSE, smooth.filter.number = 10, smooth.family = "DaubLeAsymm", smooth.levels = 3:(nlevels(WPwst) - 1), smooth.dev = madmad, smooth.policy = "LSuniversal", smooth.value = 0, smooth.by.level = FALSE, smooth.type = "soft", smooth.verbose = FALSE, smooth.cvtol = 0.01, smooth.cvnorm = l2norm, smooth.transform = I, smooth.inverse = I)

Arguments

x
One of the time series (must be of dyadic length).
y
The other time series, or same length as x
filter.number
The wavelet index number underlying the analysis spectrum.
family
The wavelet family underlying the analysis spectrum.
WPsmooth
If TRUE then the corrected cross wavelet periodogram is smoothed before correction.
verbose
If TRUE then helpful messages are printed as the algorithm proceeds.
smooth.filter.number
The wavelet index number for the spectral smoothing.
smooth.family
The wavelet family for the spectral smoothing.
smooth.levels
The levels in the wavelet transform that are to be thresholded for the spectral smoothing.
smooth.dev
The deviance measure used in the spectral smoothing. Note that, the default argument of madmad for spectral smoothing is not very good. It is often better to use var (although this depends on the transform. If you are using t
smooth.policy
The type of spectral smoothing
smooth.value
If manual smoothing is chosen, then this variable will contain the threshold.
smooth.by.level
In spectral smoothing, whether the thresholding is carried out differently on different levels or one global thresholding procedure is carried out
smooth.type
The type of thresholding in the spectral smoothing, i.e. hard or soft
smooth.verbose
If TRUE then informative messages during the spectral smoothing get printed out
smooth.cvtol
A tolerance associated with cross validation for the cross-valiation policy of spectral smoothing
smooth.cvnorm
The norm for goodness in cross validation in the spectral smoothing, if that policy is being used
smooth.transform
The transform function to use to transform the wavelet periodogram estimate. The wavelet periodogram coefficients are typically chi-squared in nature, a 'log' transform can pull the coefficients towards normality so that
smooth.inverse
the inverse transform of smooth.transform

Value

  • A list with the following components:
  • SThe corrected smoothed raw cross wavelet periodogram. This is the estimate of the cross wavelet spectrum.
  • WavPerThe raw cross wavelet periodogram
  • rmThis is the matrix A from the paper by Nason, von Sachs and Kroisandt. Its inverse is used to correct the raw wavelet periodogram. This matrix is computed using the ipndacw function.
  • irmThe inverse of the matrix A from the paper by Nason, von Sachs and Kroisandt. It is used to correct the raw wavelet periodogram.

Details

This function computes an estimate of the evolutionary cross wavelet spectrum of two time series according to the paper by Cardinali and Nason (2008) in the following way:
  1. The nondecimated wavelet transform of each series is computed.
  2. The raw cross wavelet periodogram is formed by theCrossWPfunction.
  3. The raw periodogram is smoothed using (potentially) TI-wavelet shrinkage.
  4. The smoothed periodogram is bias-corrected using the inverse of the inner product matrix of the discrete non-decimated autocorrelation wavelets. See the help forewspecwhere the operation is very similar.

Many of the arguments to do with the spectral smoothing are actually passed straight through to the wavelet smoothing and hence the arguments (without the prefix smooth.) are described in the help page for threshold.wd in the WaveThresh package

References

`Costationary and stationarity tests for stock index returns' by Car dinali and Nason, 2008, University of Bristol Technical Report 08:08.

See Also

ewspec, CrossWP

Examples

Run this code
#
# Compute the cross spectrum of x2 and y2
#
x2y2.crossspec <- ewcrossspec(x2, y2)
#
# Plot the spectral estimate
#
plot(x2y2.crossspec$S)

Run the code above in your browser using DataLab