[FieldTrip] Problem using ft_timelockstatistics with MVPA-Light-master

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Wed Mar 27 15:12:48 CET 2019


Dear Diane,

You may need to check whether your fieldtrip version is up-to-date. You should have a function called ft_statistics_mvpa in the fieldtrip folder. If it’s not there, you probably should update your fieldtrip.

Best wishes,
Jan-Mathijs


On 27 Mar 2019, at 15:01, D.Abdallah <da401 at kent.ac.uk<mailto:da401 at kent.ac.uk>> wrote:

Dear fieldtrip users,

I've downloaded and added to my path on Matlab the MVPA-Light-master toolbox. I'm using MATLAB R2014a. After preprocessing and segmenting my data I tried to run the classification accuracy following the steps in the fieldtrip MVPA Light tutorial: http://www.fieldtriptoolbox.org/tutorial/mvpa_light/

This is the code I have for the classification during the latency chosen:

%Classification in 0.5 0.7  latency
nFaces = numel(face_timelock.trial);
nVase = numel(vase_timelock.trial);

%%Define the configuration struct
cfg = [];
cfg.keeptrials = 'yes';
cfg.method = 'mvpa';
cfg.layout = 'biosemi64.lay';
cfg.mvpa.classifier = 'multiclass_lda';
cfg.mvpa.metric     = 'accuracy';
cfg.mvpa.k          = 5;
cfg.latency         = [0.5, 0.7];
cfg.avgovertime     = 'yes';
cfg.design          = [ones(nFaces,1); 2*ones(nVase,1)];

stat = ft_timelockstatistics(cfg, face_timelock, vase_timelock);

When I run this bit, I keep getting this error message:
Error using ft_timelockstatistics (line 162)
could not find the corresponding function for cfg.method="mvpa"

When I look into the script for ft_timelockstatistics, this is what I find in the lines that specify what stats can be used with the cfg.method function:
% fetch function handle to the intermediate-level statistics function
statmethod = ft_getuserfun(cfg.method, 'statistics');
if isempty(statmethod)
  ft_error('could not find the corresponding function for cfg.method="%s"\n', cfg.method);
else
  fprintf('using "%s" for the statistical testing\n', func2str(statmethod));
end​

I am not sure what I am doing wrong. Any help/input would be very much appreciated.

Thank you!

All the best,

Diane Abdallah
Neuropsychology PhD Student, University of Kent, UK




_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190327/7f436f46/attachment-0002.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202


More information about the fieldtrip mailing list