JoramSoch / MACS

MACS – a new SPM toolbox for model assessment, comparison and selection
GNU General Public License v3.0
22 stars 6 forks source link

calculate cvLME (automatic): unhappy if running on unestimated models #3

Closed Remi-Gau closed 4 years ago

Remi-Gau commented 4 years ago

I am getting the following error when running it:

- Model GLM_fratwhicsf (1 out of 2) ... 27-Aug-2019 13:30:23 - Failed  'MA: calculate cvLME (automatic)'
Reference to non-existent field 'swd'.
In file "/home/remi-gau/Documents/SPM/spm12/toolbox/MACS/MA_cvLME_multi.m" (???), function "MA_cvLME_multi" at line 90.
In file "/home/remi-gau/Documents/SPM/spm12/toolbox/MACS/batch_MA_cvLME_auto.m" (???), function "run_module" at line 71.

Seems to come from the lines below in: MA_cvLME_multi.m

SPM.swd will only exist if the model has been estimated.

% Estimate model if necessary
%-------------------------------------------------------------------------%
if ~isfield(SPM.xVi,'V')
    SPM_mat = strcat(SPM.swd,'/','SPM.mat');
    MA_GLM_AR_only(SPM_mat); load(SPM_mat);
    MA_cvLME_multi(SPM);
    return
end;
JoramSoch commented 4 years ago

This is fixed by Commits 7f44664 and 9d9e478.