It computes the Morlet wavelet transformation of a given time series, subject to criteria concerning: the time and frequency resolution, an (optional) lower and/or upper Fourier period.
The output is further processed by higher-order functions wt, WaveletCoherency and wc, and can be retrieved from analyze.wavelet and analyze.coherency.
The name and layout were inspired by a similar function developed by Huidong Tian and Bernard Cazelles (archived R package WaveletCo).
WaveletTransform(x, dt =1, dj =1/20, lowerPeriod =2*dt, upperPeriod = floor(length(x)*dt/3))
Arguments
x: the time series to be analyzed
dt: time resolution, i.e. sampling resolution in the time domain, 1/dt = number of observations per time unit. For example: a natural choice of dt in case of hourly data is dt = 1/24, resulting in one time unit equaling one day. This is also the time unit in which periods are measured. If dt = 1, the time interval between two consecutive observations will equal one time unit.
Default: 1.
dj: frequency resolution, i.e. sampling resolution in the frequency domain, 1/dj = number of suboctaves (voices per octave).
Default: 1/20.
lowerPeriod: lower Fourier period (measured in time units determined by dt, see the explanations concerning dt) for wavelet decomposition. If dt = 1, the minimum admissible value is 2.
Default: 2*dt.
upperPeriod: upper Fourier period (measured in time units determined by dt, see the explanations concerning dt) for wavelet decomposition.
Default: (floor of one third of time series length)*dt.
Returns
A list of class analyze.wavelet with the following elements: - Wave: complex wavelet transform of the series
Phase: phases
Ampl: amplitudes
Period: the Fourier periods (measured in time units determined by dt, see the explanations concerning dt)
Scale: the scales (the Fourier periods divided by the Fourier factor)
Power: wavelet power in the time/frequency domain
nc: number of columns = number of observations = number of observation epochs; "epoch" meaning point in time
nr: number of rows = number of scales (Fourier periods)
References
Aguiar-Conraria L., and Soares M.J., 2011. The Continuous Wavelet Transform: A Primer. NIPE Working Paper Series 16/2011.
Carmona R., Hwang W.-L., and Torresani B., 1998. Practical Time Frequency Analysis. Gabor and Wavelet Transforms with an Implementation in S. Academic Press, San Diego.
Cazelles B., Chavez M., Berteaux, D., Menard F., Vik J.O., Jenouvrier S., and Stenseth N.C., 2008. Wavelet analysis of ecological time series. Oecologia 156, 287--304.
Liu Y., Liang X.S., and Weisberg R.H., 2007. Rectification of the Bias in the Wavelet Power Spectrum. Journal of Atmospheric and Oceanic Technology 24, 2093--2102.