Dear Stephan/Alex,
Good question ! i'm afraid i've not looked at this code for a while, and you're absolutely right. Bayesian estimation does work for multiple sessions.
Looking at the code eg. lines 855 to 858 in spm_spm_vb.m which implements this algorithm we have:
% Contribution map sums over sessions
Fn = spm_vb_Fn(R0Y,block);
end
LogEv = LogEv+Fn;
So its completely fine. Your LogEv maps are entirely meaningful. They are the (contribution to the) log probability of the data given your model (design matrix) at each voxel. So if you computed a new LogEv map for a different model (design matrix) - taking the difference of the two would tell you which was best - quantified by the log Bayes factor e.g. you could compare FIR versus canonical HRF, or one set of parametric modulators versus another.
So what was going on with Alex' code. Turns out its because he is specifically asking for the Bayesian ANOVA feature to be turned on. This computes model evidence maps for the main effects and interactions - see spm_vb_ppm_anova.m - if you tell SPM you have a factorial design.
e.g.
matlabbatch{2}.spm.stats.fmri_est.method.Bayesian.anova.first = 'Yes';
or select (ANOVA, first level 'Yes' in the GUI).
And its this feature that doesn't work over sessions.
So if you turn that feature off, everything will be OK.
Best,
Will.
________________________________________
From: Stephan Geuter <[log in to unmask]>
Sent: 02 October 2015 20:07
To: [log in to unmask]; Penny, William
Subject: Re: Bayesian model estimation for multiple sessions
Dear Will and Alex.
I was wondering about the multiple session issue within the Bayesian model estimation. I estimated first-level models with 4 runs/sessions using the Bayesian method in SPM12. I also got the LogEv maps. I'm now wondering what those maps represent - according to your last email and the information in the .mat files, it should not be possible to get these maps for models with multiple sessions?
I guess, a safe way would be to estimate separate models for each run of each subject and then average the LogEv maps within subjects?
Best wishes,
Stephan
|