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)
x
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 tsmooth.transform
ipndacw
function.CrossWP
function.ewspec
where 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
ewspec
, CrossWP
#
# 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