[FieldTrip] ft_sourcestatistics cannot find field 'pos'

Lam, Nietzsche n.lam at fcdonders.ru.nl
Fri Jan 24 09:55:39 CET 2014


Hi Joram,

I'm not entirely sure if this is the solution, but when you call ft_sourcestatistics, you can try this:

<stat = ft_sourcestatistics(cfg,sourceDiffNorm{:}, sourceDiffNorm{:})>

FieldTrip statistics functions understands that you want to use the data from all subjects when you use {:}, so there's no need to call individual columns with {:,X}.

Best,
Nietzsche 



----- Original Message -----
> From: "Joram van Driel" <joramvandriel at gmail.com>
> To: "FieldTrip discussion list" <fieldtrip at science.ru.nl>
> Sent: Friday, 24 January, 2014 8:54:24 AM
> Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos'
> Hi all,
> 
> 
> I'm getting stuck with ft_sourcestatistics.
> I want to do a simple two-condition contrast on neuromag MEG data,
> where I did frequency beamforming on a pre vs. post tf-window.
> 
> 
> I followed the instructions of the tutorial, so for each subject and
> condition:
> 
> 
> 1) ft_sourceanalysis with subject-specific vol and grid structures,
> where I did the pre vs post contrast as follows:
> 
> 
> 
> sourceAll = ft_sourceanalysis(cfg, freqAll(condi));
> 
> cfg.grid.filter = sourceAll.avg.filter;
> sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) );
> sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi));
> 
> 
> 
> sourceDiff(condi) = sourcePost_con;
> sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow -
> sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow;
> 
> 
> 2) ft_sourceinterpolate with the subject-specific mri
> 3) ft_volumenormalize to MNI with coordsys 'neuromag'.
> 4) The output is stored in a subject-by-condition cell array, which I
> put into ft_sourcestatistics with the following cfg:
> 
> 
> 
> cfg = [];
> cfg.parameter = 'avg.pow';
> cfg.method = 'analytic';
> cfg.statistic = 'depsamplesT';
> cfg.correctm = 'no';
> cfg.alpha = 0.05;
> 
> 
> Nsub = 10;
> cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)];
> cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub];
> cfg.tail = 0; % number, -1, 1 or 0 (default = 0)
> cfg.ivar = 1; % number or list with indices, independent variable(s)
> cfg.uvar = 2; % number or list with indices, unit variable(s)
> 
> 
> stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1},
> sourceDiffNorm{:,2});
> 
> 
> 
> 
> This results in the error that it cannot find the field 'pos'; however
> this field is only present in the result from ft_sourceanalysis (and
> differs for each subject), but disappears as soon as
> ft_sourceinterpolate is applied. I tried to put the result from
> ft_sourceanalysis straight into ft_sourcestatistics (which according
> to the help should be possible), but this doesn't recognize the input
> as volume data (and apart from that, the subjects aren't spatially
> aligned this way).
> 
> 
> I hope someone can help me with this; any help is much appreciated!
> 
> 
> Thanks,
> Joram
> 
> 
> --
> 
> Joram van Driel, MSc.
> PhD student @ University of Amsterdam
> Brain & Cognition @ Department of Psychology
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-- 
Nietzsche H.L. Lam, MSc 
PhD Candidate 

Max Planck Institute for Psycholinguistics 
Wundtlaan 1, 6525 XD Nijmegen, The Netherlands 

Donders Institute for Brain, Cognition and Behaviour, 
Centre for Cognitive Neuroimaging, 
Kapittelweg 29, 6525EN Nijmegen, The Netherlands 

n.lam at fcdonders.ru.nl 
+31-24-3668219 


neurobiologyoflanguage.com 



More information about the fieldtrip mailing list