Jorn,<br><br>Thanks a lot for your assistance. It turns out I had in fact updated to a version that was not the most recent; I've now updated my version to the most recent one and eventually I was able to run the cluster statistics successfully. <br>
<br>I have one [hopefully final!] very minor question... when I plot the results of the cluster test, the time windows with significant clusters show up correctly (like in the samples on the wiki, the significant channels are highlighted in those time windows). But in the time windows where there are no significant clusters, for some reason all channels are highlighted--this happens with both my own data and when I try plotting the sample data from the wiki. While plotting, I checked "neg_int" and didn't see any problems (i.e., in the nonsignificant time windows neg_int was all zeroes), so I'm not sure why channels are getting highlighted there.<br>
<br>Like I said, this is not a major problem. But if anyone has any ideas why this might happen, I would greatly appreciate it. (And again, thanks a lot to Jorn for all your help so far!)<br><br>Best,<br>Steve<br><br><div class="gmail_quote">
<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Message: 1<br>
Date: Mon, 19 Sep 2011 17:13:53 +0200<br>
From: "J?rn M. Horschig" <<a href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>><br>
To: Email discussion list for the FieldTrip project<br>
<<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>><br>
Subject: Re: [FieldTrip] Problem with EEG channels in<br>
ft_neighborselection when running cluster statistics<br>
Message-ID: <<a href="mailto:4E775C31.7050305@donders.ru.nl">4E775C31.7050305@donders.ru.nl</a>><br>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"<br>
<br>
Hey Stephen,<br>
<br>
please check your FT path. You are definitely not using a recent FT<br>
version, because the line you quoted on statistics_wrapper does not<br>
exist anymore. You can verify your path by typing in Matlab 'which<br>
ft_defaults' or 'which ft_timelockstatistics' (without the quotes).<br>
<br>
Due to recent changes, it might additionally help to read these two FAQs:<br>
<a href="http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors" target="_blank">http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors</a><br>
<a href="http://fieldtrip.fcdonders.nl/faq/how_does_ft_neighbourselection_work" target="_blank">http://fieldtrip.fcdonders.nl/faq/how_does_ft_neighbourselection_work</a><br>
<br>
Anyway, the tutorial wiki page is indeed out of date, as the<br>
neighbourselection is not included correctly anymore. I'm gonna fix this<br>
:) The only thing which you need to add is<br>
cfg.neighbours=ft_neighbourselection(cfg, [...]) before calling<br>
ft_timelockstatistics. That's all that changed.<br>
<br>
Best regards,<br>
J?rn<br>
<br>
<br>
On 9/19/2011 4:43 PM, Stephen Politzer-Ahles wrote:<br>
> J?rn,<br>
><br>
> Thanks lot for this information. I tried specifying cfg.layout and got<br>
> a new error message:<br>
><br>
> ??? Error using ==> ft_neighbourselection at 130<br>
> Sensor distance is measured in an unknown unit type<br>
><br>
> Error in ==> statistics_wrapper at 241<br>
> cfg.neighbours = ft_neighbourselection(cfg,varargin{1});<br>
><br>
> Error in ==> ft_timelockstatistics at 123<br>
> [stat, cfg] = statistics_wrapper(cfg, varargin{:});<br>
><br>
><br>
> (I get the same message when trying to run<br>
> neighbours=ft_neighbourselection(cfg,data) with that layout file<br>
> specified.) The layout file I was using is based directly on<br>
> EEG1010.lay which is included in fieldtrip, and it works fine when I<br>
> use it for topoplotting and multiplotting, so I'm not sure why it's<br>
> causing errors when fed to ft_neighbourselection.<br>
><br>
> As for the version, I actually am using the most recent version (which<br>
> I downloaded yesterday before trying to run cluster statistics, and<br>
> updated my path accordingly), but still getting these errors. The code<br>
> I've been trying to run, though, is based on the sample code on the<br>
> wiki page<br>
> <a href="http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock" target="_blank">http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock</a>,<br>
> which may be out of date.<br>
><br>
> Is there perhaps anyone on the list who has run cluster statistics on<br>
> EEG data and would be willing to share a sample of their code?<br>
><br>
> Best,<br>
> Steve<br>
><br>
> Message: 1<br>
> Date: Mon, 19 Sep 2011 09:12:32 +0200<br>
> From: "J?rn M. Horschig" <<a href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a><br>
> <mailto:<a href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>>><br>
> To: Email discussion list for the FieldTrip project<br>
> <<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a> <mailto:<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>>><br>
> Subject: Re: [FieldTrip] Problem with EEG channels in<br>
> ft_neighborselection when running cluster statistics<br>
> Message-ID: <<a href="mailto:4E76EB60.9080801@donders.ru.nl">4E76EB60.9080801@donders.ru.nl</a><br>
> <mailto:<a href="mailto:4E76EB60.9080801@donders.ru.nl">4E76EB60.9080801@donders.ru.nl</a>>><br>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"<br>
><br>
> Hey Stephen,<br>
><br>
> You need to specify the position of your electrodes, which are mostly<br>
> stored in an 'elec' structure. If you do not have that available, you<br>
> can circumvent the problem by defining a cfg.layout. In that case,<br>
> neighbouring sensors will be selected according to how they are placed<br>
> in that layout-file you specify. That's not 100% correct of<br>
> course, but<br>
> at least an estimate how the sensors are positioned (note that a<br>
> layout<br>
> has only 2D coordinates). For example, you could use cfg.layout =<br>
> 'EEG1010.lay' as a start.<br>
><br>
> Anyway, could you try using a more recent version of FieldTrip? A few<br>
> months ago, we changed the way the neighbourselection works (actually,<br>
> you have to call cfg.neighbours = ft_neighbourselection manually,<br>
> now).<br>
> You can then also check with cfg.feedback = 'yes' whether the<br>
> neighbourselection looks alright to you (that's the same as calling<br>
> ft_neighbourplot)<br>
><br>
> Hope it helps! Best regards,<br>
> J?rn<br>
><br>
><br>
><br>
> On 9/17/2011 6:42 PM, Stephen Politzer-Ahles wrote:<br>
> > When attempting to run cluster statistics on my EEG data (originally<br>
> > from Neuroscan .CNT, then processed in EEGLAB and finally<br>
> imported to<br>
> > fieldtrip) using ft_timelockstatistics(), I receive the following<br>
> > error message:<br>
> ><br>
> > ??? Error using ==> ft_neighbourselection at 114<br>
> > Did not find gradiometer or electrode information.<br>
> ><br>
> > Error in ==> statistics_wrapper at 241<br>
> > cfg.neighbours = ft_neighbourselection(cfg,varargin{1});<br>
> ><br>
> > Error in ==> ft_timelockstatistics at 123<br>
> > [stat, cfg] = statistics_wrapper(cfg, varargin{:});<br>
> ><br>
> > This seems to be because when I use cfg.channel = {'EEG'}; with my<br>
> > data, the channel information (the variable "sens" used in<br>
> > ft_neighbourselection) consists only of the list of channel labels:<br>
> ><br>
> > sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........}<br>
> ><br>
> > On the other hand, when I run timelockstatistics on the sample data<br>
> > from the wiki, "sens" includes much more information:<br>
> ><br>
> > sens =<br>
> ><br>
> > pnt: [151x3 double]<br>
> > ori: [356x3 double]<br>
> > tra: [184x356 double]<br>
> > label: {151x1 cell}<br>
> > unit: 'cm'<br>
> ><br>
> > I think most of that extra information is planar gradient data<br>
> (i.e.,<br>
> > it comes from GA_FIC.grad). Since my data are EEG data, I assume it<br>
> > wouldn't make sense to use ft_megplanar on them. So, assuming that I<br>
> > need to get the extra channel location information into my EEG data,<br>
> > does anyone have any ideas on how to do that?<br>
> ><br>
> > Best,<br>
> > Steve Politzer-Ahles<br>
> ><br>
> > --<br>
> > Stephen Politzer-Ahles<br>
> > University of Kansas<br>
> > Linguistics Department<br>
> > <a href="http://www.linguistics.ku.edu/" target="_blank">http://www.linguistics.ku.edu/</a><br>
</blockquote></div>