Thread Subject: confidence limits on coherence

Subject: confidence limits on coherence

From: Gillian

Date: 12 Feb, 2009 16:46:02

Message: 1 of 3

Does anyone know how to calculate confidence limits on a coherency spectrum? I have two time series called dataset_1 and dataset_2, and have found the coherence between them as follows:

        % spectral density of time series with themselves using cpsd
        [P_1,freq_cpsd]=cpsd(dataset_1,dataset_1,[],[],[],1/del_t);
        [P_2,freq_cpsd]=cpsd(dataset_2,dataset_2,[],[],[],1/del_t);

        % cross spectral density of two time series
        [P_cross,freq_cpsd]=cpsd(dataset_1,dataset_2,[],[],[],1/del_t);
        
        K_cross=real(P_cross);
        Q_cross=imag(P_cross);

        % coherence
        cohe=P_cross./sqrt(P_1.*P_2);
        coh_cpsd=abs(cohe);

        % phase
        phase_cpsd=atan2(Q_cross,K_cross);

So this gives me the coherence and phase, but of course the coherence is only significant if it is above the chosen confidence level - say 95% - and I don't know how to calculate that.

Thanks
Gillian

Subject: confidence limits on coherence

From: craq Rapson

Date: 4 Jun, 2009 09:53:01

Message: 2 of 3

Hi,

I'm interested in an answer to this aswell. I don't know how to do it, but my best guess would be:

repeat the coherence calculation many times (or break a large dataset into many small pieces) and see if the results fit a normal distribution. If so, then you can calculate a standard deviation and 95% confidence interval... You might have to calculate the confidence interval separately for each frequency.

I don't think you can get confidence information from spectral information, but I'd gladly be proven wrong.

Cheers
Chris

"Gillian " <g.damerell@uea.removethis.ac.uk> wrote in message <gn1joa$inh$1@fred.mathworks.com>...
> Does anyone know how to calculate confidence limits on a coherency spectrum? I have two time series called dataset_1 and dataset_2, and have found the coherence between them as follows:
>
> % spectral density of time series with themselves using cpsd
> [P_1,freq_cpsd]=cpsd(dataset_1,dataset_1,[],[],[],1/del_t);
> [P_2,freq_cpsd]=cpsd(dataset_2,dataset_2,[],[],[],1/del_t);
>
> % cross spectral density of two time series
> [P_cross,freq_cpsd]=cpsd(dataset_1,dataset_2,[],[],[],1/del_t);
>
> K_cross=real(P_cross);
> Q_cross=imag(P_cross);
>
> % coherence
> cohe=P_cross./sqrt(P_1.*P_2);
> coh_cpsd=abs(cohe);
>
> % phase
> phase_cpsd=atan2(Q_cross,K_cross);
>
> So this gives me the coherence and phase, but of course the coherence is only significant if it is above the chosen confidence level - say 95% - and I don't know how to calculate that.
>
> Thanks
> Gillian

Subject: confidence limits on coherence

From: Wayne King

Date: 4 Jun, 2009 12:22:01

Message: 3 of 3

Hi, have a look at Schumway and Stoffer Time series analysis and its applications. You can view the results (from the 1st edition) at google books by searching

schumway and stoffer F statistic for coherence. It's on page 250 of the 1st edition.


hope that helps,

"craq Rapson" <chris.rapson@ipp.mpg.de> wrote in message <h085ht$gq7$1@fred.mathworks.com>...
> Hi,
>
> I'm interested in an answer to this aswell. I don't know how to do it, but my best guess would be:
>
> repeat the coherence calculation many times (or break a large dataset into many small pieces) and see if the results fit a normal distribution. If so, then you can calculate a standard deviation and 95% confidence interval... You might have to calculate the confidence interval separately for each frequency.
>
> I don't think you can get confidence information from spectral information, but I'd gladly be proven wrong.
>
> Cheers
> Chris
>
> "Gillian " <g.damerell@uea.removethis.ac.uk> wrote in message <gn1joa$inh$1@fred.mathworks.com>...
> > Does anyone know how to calculate confidence limits on a coherency spectrum? I have two time series called dataset_1 and dataset_2, and have found the coherence between them as follows:
> >
> > % spectral density of time series with themselves using cpsd
> > [P_1,freq_cpsd]=cpsd(dataset_1,dataset_1,[],[],[],1/del_t);
> > [P_2,freq_cpsd]=cpsd(dataset_2,dataset_2,[],[],[],1/del_t);
> >
> > % cross spectral density of two time series
> > [P_cross,freq_cpsd]=cpsd(dataset_1,dataset_2,[],[],[],1/del_t);
> >
> > K_cross=real(P_cross);
> > Q_cross=imag(P_cross);
> >
> > % coherence
> > cohe=P_cross./sqrt(P_1.*P_2);
> > coh_cpsd=abs(cohe);
> >
> > % phase
> > phase_cpsd=atan2(Q_cross,K_cross);
> >
> > So this gives me the coherence and phase, but of course the coherence is only significant if it is above the chosen confidence level - say 95% - and I don't know how to calculate that.
> >
> > Thanks
> > Gillian

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
psd Gillian 12 Feb, 2009 11:50:22
coherence Gillian 12 Feb, 2009 11:50:22
spectral analysis Gillian 12 Feb, 2009 11:50:22
confidence limits Gillian 12 Feb, 2009 11:50:22
rssFeed for this Thread

Contact us at files@mathworks.com