Open Remi-Gau opened 2 years ago
Dear @Remi-Gau,
thanks for the issue.
Yes, it probably has to do with the empty regressors. However, the problem should only occur, if there's a regressor that only has entries in exactly 1 session and no entries in the S-1 other sessions (s.t. there is a CV fold with an entirely empty training regressor - this is the source of the problem). And, even in this case, there's a solution in place (represented by this code line in the cvLME routine). Moreover, from your design matrix I can see that each regressor has entries in at least two sessions (right?), so I don't really know what's wrong here.
If you could send the SPM.mat
file to joram.soch@bccn-berlin.de
, I can maybe take a closer look at this next week. In case that the SPM.mat
file is too big, try this:
load SPM.mat
SPM.xVol = rmfield(SPM.xVol,'XYZ');
save('SPM_new.mat','SPM');
Cheers Joram
For those who are interested in the technical details, please have a look at these lousy hand-written notes which I didn't have the time to transfer to machine-readable text so far.
Regarding the question (i) whether session need to have the same number of regressors (answer: yes) and (ii) whether they need to be in the same order (answer: yes), please see this one-page excerpt from the toolbox manual.
I got this error when running cvLME on one participant (might occur in others too but I have not checked yet) when trying to add MACS to our BIDS pipelines:
See this PR: https://github.com/cpp-lln-lab/CPP_SPM/pull/472
Here is the design matrix for that subject / model.
Had to specify some dummy regressors, due to some conditions not being present in all runs. That did not affect other subjects / models so far though.
Let me know if I can help in some ways to help trouble shoot this one.