[Eeglablist] crossf function output -- help?

Arnaud Delorme arno at ucsd.edu
Thu Jul 28 11:50:58 PDT 2011


Dear Danielle,

your problem is probably that you are feeding continuous data to the newcrossf function. This type of coherence is only defined when you have multiple trials. As in another recent message, you may read the article below (and more specifically look for ERPCOH, page 9)

Delorme, A., Makeig, S. (2004) EEGLAB: an open source toolbox for analysis of single-trial EEG dynamics including independent component analysis. Journal of Neuroscience Methods, 134(1), 9-21. Author's PDF, Science direct.

Best, 

Arno

On Jul 11, 2011, at 11:15 AM, Danielle Farrar wrote:

> Hello everyone,
> 
> I'm trying to use the crossf function to get values for the coherence across channels at different frequencies.  I'm having trouble with the documentation of the function -- when I type help crossf into the matlab command line, it says that the output is as follows:
> 
> Outputs: 
>         coh         = Matrix (nfreqs,timesout) of coherence magnitudes 
>         mcoh        = Vector of mean baseline coherence at each frequency
>         timesout    = Vector of output latencies (window centers) (ms).
>         freqsout    = Vector of frequency bin centers (Hz).
>         cohboot     = Matrix (nfreqs,2) of [lower;upper] coher signif. limits
>                       if 'boottype' is 'trials',  (nfreqs,timesout, 2)
>         cohangle    = (nfreqs,timesout) matrix of coherence angles (in radians)
>         cohangles   = (nfreqs,timesout,trials) matrix of single-trial coherence 
>                        angles (in radians), saved and output only if 'savecoher',1
> 
> What I am trying to do is average some evoked potential data, and then compare pair-wise, a series of the electrodes to determine their coherence, which I will eventually write to a file.  I am new to this, so am having trouble understanding how to interpret the output of the crossf function, which I assume will give me what I am looking for. 
> 
> So my questions is: the first output matrix that I get produces a 1.0 for every cell in the matrix for the electrodes I've tried -- is it likely that they are that in sync?  That should be giving me the matrix of coherence magnitudes, correct? How is the coherence calculated?  I also print out the mean baseline coherence, which also gives a matrix of 1s.
> 
> Here is a sample of the code I am trying to use (I am aware that the loops will only be executed once, this is for debugging purposes):
> for i=9:9,
>     EEG = eeg_checkset( EEG );
> 
>     disp(i);
> 
>     disp(channels{i});
> 
>     erp = pop_erpimage(EEG,1, [i],[],wcst_rare,0,1,{},[],'' , 'yerplabel', '\muV', 'erp', 'on', 'limits',[NaN NaN -25 25 NaN NaN NaN NaN] , 'cbar', 'on', 'vert',[170 300] );
> 
>     erp_avg = mean(erp,2);
> 
>  
> 
>     for j=14:14,
> 
>        erp2 = pop_erpimage(EEG,1, [j],[],wcst_rare,0,1,{},[],'' , 'yerplabel', '\muV', 'erp', 'on', 'limits',[NaN NaN -25 25 NaN NaN NaN NaN] , 'cbar', 'on', 'vert',[170 300] );
> 
>        erp_avg2 = mean(erp2,2);
> 
>        [R, mbase, times, freqs]= crossf(erp_avg,erp_avg2,1150,[-150 999],1000,0,'type','coher');
> 
>        disp(
> 
> 'Displaying coherence values');
>        disp(R);
> 
>        disp(
> 
> 'Displaying mean baseline coherence values');
>        disp(mbase);
> 
>        disp(
> 
> 'Displaying times');
>        disp(times);
> 
>        disp(
> 
> 'Displaying freqs');
>        disp(freqs);
> 
>         disp('Size of times');
> 
>        disp(size(times));
> 
>        disp(
> 
> 'Size of freqs');
>        disp(size(freqs));
> 
>     end
> 
> end
> 
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110728/ac1d43d1/attachment.html>


More information about the eeglablist mailing list