[FieldTrip] Group analysis at source level
Laura Rueda Delgado
Laura.Rueda at faber.kuleuven.be
Thu Jul 24 17:36:59 CEST 2014
Dear fieldtrip users,
I'm working with source estimations of EEG data. At the moment, I have estimated the sources at the individual level with individual MRIs. I've used ft_sourceinterpolate and ft_volumenormalise to transform the resulting estimation maps into a template for comparison, and I do this for every subject:
cfg = [];
cfg.parameter = 'avg.pow';
source = ft_sourceinterpolate(cfg, source, mri);
cfg = [];
cfg.template = '\spm8\templates\T1.nii';
cfg.parameter = 'all';
cfg.nonlinear = 'yes';
cfg.coordsys = 'spm';
source = ft_volumenormalise(cfg, source);
Once I have the estimated sources for all the subjects, I use ft_sourcestatistics:
cfg = [];
cfg.dim = sourcePre_con{1}.dim;
cfg.method = 'montecarlo';
cfg.statistic = 'depsamplesT';
cfg.parameter = 'avg.pow';
cfg.correctm = 'cluster';
cfg.numrandomization = 'all';
cfg.alpha = 0.05;
cfg.tail = 0;
cfg.design(1,:) = [1:num 1:num];
cfg.design(2,:) = [ones(1,num) ones(1,num)*2];
cfg.uvar = 1;
cfg.ivar = 2;
stat = ft_sourcestatistics(cfg,sourcePost_con{:}, sourcePre_con{:});
And I get this error:
Reference to non-existent field 'pos'.
Error in statistics_wrapper>get_source_avg (line 643)
fprintf('only selecting voxels inside the brain for statistics (%.1f%%)\n', 100*length(varargin{1}.inside)/size(varargin{1}.pos,1));
Error in statistics_wrapper (line 206)
[dat, cfg] = get_source_avg(cfg, varargin{:});
Error in ft_sourcestatistics (line 107)
[stat, cfg] = statistics_wrapper(cfg, varargin{:});
I check the data structure and the structure of the sources at the individual level, before interpolating and normalising has the pos field, but after these steps, it's gone. How can I work around this error? Do I have to keep the pos field and transform it according to the template?
Thank you in advance for your help.
Best regards,
Laura Rueda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140724/91c701c9/attachment-0001.html>
More information about the fieldtrip
mailing list