wavelet coherence significance test

9 visualizzazioni (ultimi 30 giorni)
yx z
yx z il 2 Giu 2019
Risposto: Prasanna il 4 Nov 2024 alle 8:58
I am using wcoherence to get the wavelet coherence of two signals.
how can i evaluate the significance (eg. 95%) ??

Risposte (1)

Prasanna
Prasanna il 4 Nov 2024 alle 8:58
Hi yx,
To evaluate the significance of wavelet coherence when using the ‘wcoherence’ function in MATLAB, refer the following:
  • First, compute the wavelet coherence between your two signals using the ‘wcoherence’ function.
  • Create surrogate data to estimate the significance level. Surrogate data can be generated by randomizing one of the signals while preserving its power spectrum.
  • Calculate the wavelet coherence for each surrogate dataset.
  • Use the distribution of coherence values from the surrogate data to determine the significance threshold (e.g., the 95th percentile).
A sample MATLAB code to evaluate is as below assuming two example random signals:
% Example signals
x = randn(1, 1000);
y = randn(1, 1000);
% Compute wavelet coherence
[wcoh, ~, ~, ~] = wcoherence(x, y);
% Number of surrogates
numSurrogates = 1000;
surrogateCoherence = zeros(size(wcoh, 1), size(wcoh, 2), numSurrogates);
% Generate surrogate data and compute coherence
for i = 1:numSurrogates
ySurrogate = y(randperm(length(y))); % Randomize y
[wcohSurrogate, ~, ~, ~] = wcoherence(x, ySurrogate);
surrogateCoherence(:, :, i) = wcohSurrogate;
end
% Determine the 95th percentile threshold
significanceThreshold = prctile(surrogateCoherence, 95, 3);
% Plot the wavelet coherence and significance threshold
figure;
subplot(2, 1, 1);
imagesc(wcoh);
title('Wavelet Coherence');
colorbar;
subplot(2, 1, 2);
imagesc(significanceThreshold);
title('95% Significance Threshold');
colorbar;
The output of the above sample code is as follows:
The surrogate data is generated by randomizing one of the signals. This helps in creating a distribution of coherence values under the null hypothesis. For more information regarding the functions used, refer the following documentations:

Categorie

Scopri di più su Wavelet Toolbox in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by