wavelet coherence significance test

26 vues (au cours des 30 derniers jours)
yx z
yx z le 2 Juin 2019
I am using wcoherence to get the wavelet coherence of two signals.
how can i evaluate the significance (eg. 95%) ??
  1 commentaire
Saeed Soleimani
Saeed Soleimani le 18 Juin 2023
You should use R programming language :-(

Connectez-vous pour commenter.

Réponses (1)

Prasanna
Prasanna le 4 Nov 2024
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:

Catégories

En savoir plus sur Wavelet Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by