Dear Banyai,
See comments down here for some clarification.
Bányai Mihály a écrit :
> Dear developers and users,
>
> I currently try to compare several DCM models fitted to fMRI data
> collected from several subjects. The concept of Bayesian model
> selection is clear to me, however, I find the piece of code that
> computes the posterior probabilities of different models of a subject
> pretty mysterious. I'm referring to this part:
>
> % compute conditional probability of DCMs under flat priors.
> %--------------------------------------------------------------------------
> F = evidence - min(evidence);
>
"Relative log-evidence" if estimated relative to the model with the
smallest one, i.e. smallest F is removed from all.
> i = F < (max(F) - 32);
>
List of models which have a log-evidence at least 32 below the maximum.
Remember we're working with logs, so it means models whose evidence is
at least 32 times smaller than model with largest one.
> P = F;
>
Create a vector P, with same values as P
> P(i) = max(F) - 32;
>
Put those quite small log-evidences to a default value 32 units below
the maximum
> P = P - min(P);
>
Again get all the log-evidences relative to the smallest value, so
smallest log-evidence is zero and maximum is below or equal to 32.
> P = exp(P);
>
Go from log-evidence to evidence.
> P = P/sum(P);
>
Get the posterior probability of each model from their evidence.
> Is there any documentation available about the theoretical idea behind
> this computation?
>
> My other question is that where can I find out what happens if I use
> the graphical interface to compare the models using the data from
> several subjects. If I do this, I get very different results than if I
> compute the model probabilities and log-evidences separately for every
> subject and average them out.
>
Are you doing exactly as is done in the code ?
Check these 2 routines for the details of the calculation, which is
sometimes a bit intricate: spm_BMS.m and spm_dcm_bma.m
HTH,
Chris
> Thank you for your help,
> Mihály Bányai
>
>
>
|