*! version 1.1.0 2026-05-11

Title

xwt -- Cross-Wavelet Transform

Syntax

xwt var1 var2 [if] [in],
[dt(#) mother(name) param(#) dj(#) s0(#)
nodisplay]

Description

xwt computes the Cross-Wavelet Transform W_xy = W_x * conj(W_y),
where W_x and W_y are the continuous wavelet transforms of var1
and var2. The cross-wavelet identifies regions of common power and
relative phase in the time-frequency plane.

For coherence (normalized cross-wavelet), use wtc.

Options

dt(#) time step (default 1)

mother(name) mother wavelet: morlet (default),
paul, dog

param(#) mother-specific parameter (-1 = use mother default)

dj(#) scale spacing in sub-octaves (default 0.25)

s0(#) smallest scale (default 2*dt)

nodisplay suppress text results table

Phase interpretation

e(phase) contains the phase of W_xy in radians:

0 in-phase

+pi/2 var1 leads var2 by 1/4 cycle

-pi/2 var2 leads var1 by 1/4 cycle

+/-pi anti-phase

Examples

. xwt gdp inflation, dt(0.25)

. mat list e(power)

Stored results

e(power) cross-wavelet amplitude |W_xy| (nscale x N)

e(phase) phase of W_xy in radians (nscale x N)

e(period) Fourier period vector

e(scale) wavelet scale vector

e(coi) cone of influence

Also see

wavelet, wt, wtc