Dear David,

Here are my answers to your follow-ups.

1. This is hard to quantify - there is potentially an advantage (assuming you used some form of spatial prior at the first level) - in that the regression coefficients and therefore contrasts are implicitly smoothed by a data-defined amount - and this is tuned to each regression coefficient. So the advantage, if any, would be that an optimal smoothing would have been applied. Whether this justifies the extra amount of time to fit the model is up to the user.

2. That's correct - given the connection with FDR there is no need for a multiple comparisons correction.

3. The main article to read is:

More recently we have added a new functionality for the equivalent of F-contrasts which does not require an effect size threshold. It computes log-evidence maps and you just threshold the log-odds ratio:



From: David Hofmann <[log in to unmask]>
Sent: 06 February 2017 11:27
To: Penny, William
Cc: [log in to unmask]
Subject: Re: [SPM] How to run a (1st + 2nd level) Bayesian analysis in SPM
Hi William,

thanks for the helpful reply! I have a few follow-up questions and hope you can also help me with those:

1. Is there any advantage in running a first level Bayesian analysis beforehand, i.e. what more can be done? 

2. Is it necessary to correct for multiple comparisons (either 1st or 2nd level respectively)? I read that this is never necessary and that a PPM thresholded at 95 % confidence is related to an FDR of 5 % in classical analysis.

3. Can you recommend an article which can be cited and that explains the method used for running a 2nd level Bayesian analysis on top or a normal GLM?

Thanks again!


2017-02-03 14:57 GMT+01:00 Penny, William <[log in to unmask]>:

Dear David,

For one-dimensional contrasts (e.g. t-tests) SPM asks you for two parameters for Bayesian inference at the second level (i) Effect Size Threshold (Default 0.1) and (ii) Log Odds Threshold (Default 10).

Other reasonable choices would be 0 and 3.

The effect size threshold, T, tells SPM that you are only interested in voxels with contrast values C^beta > T. ie. that your experimental effect is bigger than T.

The Log Odds Threshold, L, tells SPM that you are only interested in voxels where SPM is sure (with posterior probability 1/(1+exp(-L)) )

that this is the case.

Note that L=3 gives you p=0.95.

L=10 is much, much more stringent giving p=0.99995.

I would advise you use the most recent version of SPM when doing this.

Also, you don't have to do a first level Bayesian analysis if you want to a second-level one.

All the best,


From: SPM (Statistical Parametric Mapping) <[log in to unmask]> on behalf of David Hofmann <[log in to unmask]>
Sent: 31 January 2017 10:52
To: [log in to unmask]
Subject: [SPM] How to run a (1st + 2nd level) Bayesian analysis in SPM
Hi all,

I have an fMRI event-related design in which subjects viewed fearful and neutral faces. I want to run a 1st level and a second level Bayesian analysis in SPM. For this, I did the following steps:

1. 1st level Bayesian analysis with standard settings as described in the manual
2. Contrast fear faces > neutral faces
3. For the 2nd level analysis, I smoothed the con-files and ran a one-sample t-test (estimated the model first with the classical and then with the 2nd level Bayesian option) 
4. I specified a t-contrast (i.e. [1]) for the one-sample t-test of the subjects
5. I chose apply masking - none

Now SPM is asking me for the Effect size threshold for PPM at the 2nd level and suggests 0.99. Whereas the meaning of the effect size threshold was clearly explained in the manual for the 1st level analysis, I not sure what value to choose for the 2nd level analysis and what this value means.When I select the suggested value (0.99) and choose as Log Odds Threshold 10, which should correspond to 95 % certainty, then there is no effect. There are also no effects for a value as low as 0.2. This is very strange since in the classical analysis there are very strong effects (fusiform gyrus) which survive an FWE correction at 0.01.

The questions are as follows:

1. Are the analysis steps I did correct or is there a better way to test for group effect by means of Bayesian analysis (e.g. Bayesian model comparison, Rosa, M.J. et al., 2010)

2. What does the effect size threshold at the 2nd level mean and what are reasonable values?

Here is an overview of posts with topic Bayesian analysis, which did not help me answering my questions: