Hi David,
Have a look at spm_getSPM.m from line 513. For first level Bayes, it is
possible to define the effect size threshold via the field xSPM.gamma.
I've just made the same change for second level Bayes in the attached file.
Then have a look at config/spm_run_results.m to see how to fill in the
xSPM variable and call spm_results_ui/spm_getSPM (you should be able to
specify contrasts using the existing "Contrast Manager" batch interface).
Does it get closer to what you are looking for?
Best regards,
Guillaume.
On 31/05/17 18:31, David Hofmann wrote:
> Hey Guillaume,
>
> the problem is that I have a lot of contrasts to estimate and want to
> use varying effect size thresholds. I can do this via the gui or the
> batch interface but it will take some time and is cumbersome to open
> each contrast separately and set the different effect sizes. So I wanted
> to automatize it, since I will probably need this again. That is, given
> some contrast vector I want to find the functions that create the spmP
> maps and add the entries in the SPM file asf. I found the spm_contrast.m
> but it does not create the SPM.xCon and SPM.PPM.xCon entries. And the
> spm_Fcutil.m creates some contrasts but the bayesian ones it seems.
>
> Hope it is clear what I mean and not sure if there is a work around but
> hope so.
>
> greetings
>
> David
>
> 2017-05-31 17:42 GMT+02:00 Guillaume Flandin <[log in to unmask]
> <mailto:[log in to unmask]>>:
>
> Dear David,
>
> You should be able to use the "Contrast Manager" batch interface for
> this - what makes you say otherwise? The known issue is that you cannot
> set the effect size threshold (Gamma) but you will be asked for it each
> time you look at results.
>
> Best regards,
> Guillaume.
>
>
> On 29/05/17 09:18, David Hofmann wrote:
> > Hi all,
> >
> > I noticed that the batch GUI for creating a contrast does not estimate
> > the contrasts for a bayesian analysis but only for a classical
> analysis
> > (at 2nd level). So I need to estimate the contrasts "manually".
> >
> > That is, I start with some contrast vector e.g. [1;0;0;0] and
> specify if
> > it is a T,F or P contrast (in my case P) and then use the proper spm
> > functions to estimate this contrast, i.e. create the xCon ( PPM.xCon)
> > fields, write the files and update the SPM file asf.
> >
> > Can someone give me an example code on how to do this?
> >
> > greetings
> >
> > David
>
> --
> Guillaume Flandin, PhD
> Wellcome Trust Centre for Neuroimaging
> University College London
> 12 Queen Square
> London WC1N 3BG
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|