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

D.Abdallah da401 at kent.ac.uk
Wed Mar 27 15:01:04 CET 2019


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




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190327/697bc89e/attachment-0001.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