<p>Hi Roey and Joern, </p>
<p>Joern, my subjects' data are interpolated to the MNI template, as far as I understand. I'm using a code that Jan-Mathijs and I worked on some time ago, so what I'm doing should be really close to what's in the tutorial. The only thing I can tell that is in the tutorial but not in my code is the following: <br>
"After that you should put .pos, .xgrid, .ygrid, .zgrid, .dim field from the template_grid onto the subjects's source, which is thereby in MNI coordinates." <br>In my code, we only copied .pos and .dim from the template to the subjects, but not .xgrid, .ygrid, .zgrid. Would that explain the error?<br>
I think I was using an FT version from the beginning of October when I got the error (running in my PC, so not the DCCN's... sorry, I cannot look that up now). When were the changes made you are referring to? I could look up which version I was using (sorry for missing this very crucial information in my last email), but it might as well be the case, as you mentioned, that Roey and I are the first ones to try it out in this particular way ;) <br>
Let me know if you need more info. Btw, I have these data in a hard disk at the DCCN if you need to have a look.</p>
<p>Roey, yes, I'm using an MNI grid per subject (similar to the tutorial: <a href="http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space">http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space</a> > Make the individual subjects' grid).</p>

<p>Cheers, Vitoria</p>
<p>> ------------------------------<br>> <br>> Message: 3<br>> Date: Wed, 16 Oct 2013 20:10:20 +0300<br>> From: Roey <<a href="mailto:roeysc@gmail.com">roeysc@gmail.com</a>><br>> To: FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>><br>
> Subject: Re: [FieldTrip] source statistics with ROI yields NaN<br>> clusters<br>> Message-ID: <<a href="mailto:FF996E6D-BAEF-458D-BB41-B9CF1FC5B1DA@gmail.com">FF996E6D-BAEF-458D-BB41-B9CF1FC5B1DA@gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>> <br>> Hi Vitoria and everyone else,<br>> <br>> I agree with J?rn (thank you!) , indeed it seems this is the same<br>> problem. Hopefully I'll get back to it next week and maybe figure it<br>
> out. Right now it seems like the A side consists of all the<br>> inside-voxels, whereas the B side consists of the different ROIs, and<br>> hence the mismatch.<br>> <br>> A possible solution could be having the atlas we are using available<br>
> to that function, and translating the B side to the voxel space.<br>> <br>> By the way, are you using an MNI grid per subject?<br>> <br>> Best,<br>> roey<br>> <br>> <br>> <br>> ?-16 ???? 2013, ???? 17:07, "J?rn M. Horschig"<br>
> <<a href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>> ???/?:<br>> <br>> > Hi Vitoria,<br>> ><br>> > I guess that is the same error that Roey Schurr described a few days<br>
> > back. There were some changes recently in the atlas lookup function<br>> > (we replaced one function and made another more general). Apparently<br>> > that broke some things, or you two just happen to do this as the<br>
> > first ever ;)<br>> > The only thing I can think of is that you might need to interpolate<br>> > to the MNI template so that the dimensions are matched between the<br>> > atlas and your source structures. Could you give that a try and let<br>
> > us know whether that helps?<br>> ><br>> > Best,<br>> > J?rn<br>> ><br>> ><br>> > On 10/16/2013 11:19 AM, Vit?ria Magalh?es Piai wrote:<br>> >> Dear all,<br>> >><br>
> >> I'm trying to run ft_sourcestatistics with a specified ROI. It's<br>> >> data (MNEs) averaged over time.<br>> >><br>> >> If I run ft_sourcestatistics without an ROI, I get a cluster with<br>
> >> prob = .178. It looks like this (figure attached), where I masked<br>> >> using the t-values.<br>> >> Since I'm dealing with an N400-like component, I've got good<br>> >> reasons to expect the effect to be localised (mainly) to left<br>
> >> temporal areas.<br>> >><br>> >> So I tried adding this to my cfg:<br>> >><br>> >> cfgst.atlas = 'aal\ROI_MNI_V4.nii';<br>> >> cfgst.roi = {'Temporal_Mid_L' 'Temporal_Sup_L' 'Temporal_Inf_L' };<br>
> >> cfgst.avgoverroi = 'yes';<br>> >> cfgst.hemisphere = 'left';<br>> >> cfgst.inputcoord = 'mni' ;<br>> >> stat = ft_sourcestatistics(cfgst, iRel{:}, iIde{:});<br>
> >><br>> >> If cfgst.avgoverroi == 'yes'; I get the following error:<br>> >><br>> >> ??? In an assignment A(:) = B, the number of elements in A and B<br>> >> must be the same.<br>
> >> Error in ==> clusterstat at 187<br>> >>     tmp(cfg.inside) = postailobs;<br>> >> Error in ==> ft_statistics_montecarlo at 326<br>> >>   [stat, cfg] = clusterstat(cfg, statrand,<br>
> >>   statobs,'issource',issource);<br>> >> Error in ==> statistics_wrapper at 298<br>> >>     [stat, cfg] = statmethod(cfg, dat, design,<br>> >>     'issource',issource);<br>
> >> Error in ==> ft_sourcestatistics at 107<br>> >>     [stat, cfg] = statistics_wrapper(cfg, varargin{:});<br>> >><br>> >> If cfgst.avgoverroi == 'no';<br>> >> ft outputs "found positive clusters in observed data" and<br>
> >> stat.posclusters/negclusters is only NaN. This is regardless of<br>> >> whether cfgst.roi is one label or a cell array.<br>> >><br>> >> Does anyone know what I'm doing wrong?<br>
> >> I've been completely stuck on source statistics for these MNEs for<br>> >> days, so any help would be highly appreciated, even if it is to<br>> >> suggest another way to do the stats!<br>
> >><br>> >> Thanks a lot, Vit?ria<br>> >><br>> >><br>> >> _______________________________________________<br>> >> fieldtrip mailing list<br>> >> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
> >> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>> ><br>> ><br>> > --<br>> > J?rn M. Horschig<br>> > PhD Student<br>
> > Donders Institute for Brain, Cognition and Behaviour<br>> > Centre for Cognitive Neuroimaging<br>> > Radboud University Nijmegen<br>> > Neuronal Oscillations Group<br>> > FieldTrip Development Team<br>
> ><br>> > P.O. Box 9101<br>> > NL-6500 HB Nijmegen<br>> > The Netherlands<br>> ><br>> > Contact:<br>> > E-Mail: <a href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a><br>
> > Tel: +31-(0)24-36-68493<br>> > Web: <a href="http://www.ru.nl/donders">http://www.ru.nl/donders</a><br>> ><br>> > Visiting address:<br>> > Trigon, room 2.30<br>> > Kapittelweg 29<br>
> > NL-6525 EN Nijmegen<br>> > The Netherlands<br>> > _______________________________________________<br>> > fieldtrip mailing list<br>> > <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
> > <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>> -------------- next part --------------<br>> An HTML attachment was scrubbed...<br>
> URL:<br>> <<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20131016/239e9cf4/attachment.html">http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20131016/239e9cf4/attachment.html</a>><br>
> <br>> ------------------------------<br>> <br>> _______________________________________________<br>> fieldtrip mailing list<br>> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>> <br>> End of fieldtrip Digest, Vol 35, Issue 29<br>> *****************************************<br>
</p>