xwt {biwavelet} | R Documentation |
Compute cross-wavelet
Description
Compute cross-wavelet
Usage
xwt(
d1,
d2,
pad = TRUE,
dj = 1/12,
s0 = 2 * dt,
J1 = NULL,
max.scale = NULL,
mother = "morlet",
param = -1,
lag1 = NULL,
sig.level = 0.95,
sig.test = 0,
arima.method = "CSS"
)
Arguments
d1 |
Time series 1 in matrix format ( |
d2 |
Time series 2 in matrix format ( |
pad |
Pad the values will with zeros to increase the speed of the transform. |
dj |
Spacing between successive scales. |
s0 |
Smallest scale of the wavelet. |
J1 |
Number of scales - 1. |
max.scale |
Maximum scale. Computed automatically if left unspecified. |
mother |
Type of mother wavelet function to use. Can be set to
|
param |
Nondimensional parameter specific to the wavelet function. |
lag1 |
Vector containing the AR(1) coefficient of each time series. |
sig.level |
Significance level. |
sig.test |
Type of significance test. If set to 0, use a regular
|
arima.method |
Fitting method. This parameter is passed as the
|
Value
Returns a biwavelet
object containing:
coi |
matrix containg cone of influence |
wave |
matrix containing the cross-wavelet transform |
wave.corr |
matrix containing the bias-corrected cross-wavelet transform
using the method described by |
power |
matrix of power |
power.corr |
matrix of bias-corrected cross-wavelet power using the
method described by |
phase |
matrix of phases |
period |
vector of periods |
scale |
vector of scales |
dt |
length of a time step |
t |
vector of times |
xaxis |
vector of values used to plot xaxis |
s0 |
smallest scale of the wavelet |
dj |
spacing between successive scales |
d1.sigma |
standard deviation of time series 1 |
d2.sigma |
standard deviation of time series 2 |
mother |
mother wavelet used |
type |
type of |
signif |
matrix containg significance levels |
Author(s)
Tarik C. Gouhier (tarik.gouhier@gmail.com) Code based on WTC MATLAB package written by Aslak Grinsted.
References
Cazelles, B., M. Chavez, D. Berteaux, F. Menard, J. O. Vik, S. Jenouvrier, and N. C. Stenseth. 2008. Wavelet analysis of ecological time series. Oecologia 156:287-304.
Grinsted, A., J. C. Moore, and S. Jevrejeva. 2004. Application of the cross wavelet transform and wavelet coherence to geophysical time series. Nonlinear Processes in Geophysics 11:561-566.
Torrence, C., and G. P. Compo. 1998. A Practical Guide to Wavelet Analysis. Bulletin of the American Meteorological Society 79:61-78.
Torrence, C., and P. J. Webster. 1998. The annual cycle of persistence in the El Nino/Southern Oscillation. Quarterly Journal of the Royal Meteorological Society 124:1985-2004.
Veleda, D., R. Montagne, and M. Araujo. 2012. Cross-Wavelet Bias Corrected by Normalizing Scales. Journal of Atmospheric and Oceanic Technology 29:1401-1408.
Examples
t1 <- cbind(1:100, rnorm(100))
t2 <- cbind(1:100, rnorm(100))
# Compute Cross-wavelet
xwt.t1t2 <- xwt(t1, t2)
plot(xwt.t1t2, plot.cb = TRUE, plot.phase = TRUE,
main = "Plot cross-wavelet and phase difference (arrows)")
# Real data
data(enviro.data)
# Cross-wavelet of MEI and NPGO
xwt.mei.npgo <- xwt(subset(enviro.data, select = c("date", "mei")),
subset(enviro.data, select = c("date", "npgo")))
# Make room to the right for the color bar
par(oma = c(0, 0, 0, 1), mar = c(5, 4, 4, 5) + 0.1)
plot(xwt.mei.npgo, plot.cb = TRUE, plot.phase = TRUE)