Confidence intervals for the coherence and phase calculated by CPSD

7 次查看(过去 30 天)
How can I calculate the confidence bands for the coherence and phase calculated by CPSD? In contrast to a command like pwelch I cannot find any argument like 'ConfidenceLevel'.

回答(1 个)

Ayush Gupta
Ayush Gupta 2020-8-26
There is no argument specifically for Confidence level in CSPD. Instead confidence level can be calculated with the help of percentile method. The following code can be leveraged for this.
% x is a vector, matrix, or any numeric array of data. NaNs are ignored.
% p is the confidence level (ie, 95 for 95% CI)
% The output is 1x2 vector showing the [lower,upper] interval values.
CIFcn = @(x,p)prctile(x,abs([0,100]-(100-p)/2));
  4 个评论
Vlado Malacic
Vlado Malacic 2024-6-18
This is, unfortunately, wrong, although, I would be the first one to apply it, as the one who is not an expert in this matter. One may find in the book of Thomson and Emery (2014): DATA ANALYSIS METHODS IN PHYSICAL OCEANOGRAPHY, on page 510 that the confidence level for the 95% confidence interval is equal to itself (what the method suggested above means) only if the number of independent cross-spectral realizations in each frequency band equals to 2. The number of realizations roughly means the number of segments into which the time series is divided, ignoring the method of windowing (table 5.5 on page 479) and overlapping. The method suggested above for the calculation of confidence interval does not consider the segmentation of the data at all. However the cspd function in matlab considers it heavily. Namely, the segmentation of the data increases the statistical reliability. It would be of help to users of this function of its output would be the number of segments that the method applied (so that the uswer would not try to calculate it out from the length of the data and of the (overlapped) segments. Nonetheless, the confidence interval is certainly something quite complicated and it would be nice is the function cspd would offer it.
Sincerely, Vlado Malacic, vlado.malacic@nib.si
Vlado Malacic
Vlado Malacic 2024-6-19
Just correcting typing errors in the last two sentences: It would be of help to users of the function cspd if its output would be also the number of segments that the method applied. IN this case the user would not spend time to calculate it out from the length of the data and the length of the (overlapped) segments, when he/she would like to apply 'reliable' recipes to calculate the confidence intervals. The confidence interval is certainly something quite complicated and it would be nice if the function cspd would offer it.
My apologies for not writing clear. Sincerely, Vlado

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Spectral Estimation 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by