Print

Print


Dear Hyoung-Ryul,

Will just pointed me to what is perhaps a simpler way of obtaining the log-evidence for a normal GLM than manually using the equation I mentioned.  I did not test it (nor have I looked into the details of spm_PEB), but for your information I include the relevant snippet from his email below.

Best wishes
Klaas


"You can try spm_PEB with

P{1}.X as your [n x p] design matrix
P{1}.C{1}=eye(n) as your covariance structure on observation errors

and I think

P{2}.X=zeros(p,1);
P{2}.C{2}=eye(p) as your prior covariance on parameters

Then call spm_PEB and the evidence F will be returned as the 3rd argument."



----- Weitergeleitete Mail ----
Von: Klaas Enno Stephan <[log in to unmask]>
An: [log in to unmask]
Gesendet: Mittwoch, den 25. August 2010, 13:32:47 Uhr
Betreff: Re: [SPM] Model selection (RFX) on a custom GLM

Dear Hyoung-Ryul,

If there are correlations among model parameters, AIC/BIC will use an inappropriately high penalty term, i.e. the complexity of models is over-estimated when model parameters are correlated. 

However, to manually compute the (exact) log-evidence for a general linear model, you can use Eq. A2 from the supplementary information to this paper:
http://www.ncbi.nlm.nih.gov/pubmed/20203180

Best wishes
Klaas



Von: Hyoung-Ryul Kang <[log in to unmask]>
An: [log in to unmask]
Gesendet: Mittwoch, den 25. August 2010, 3:40:03 Uhr
Betreff: Re: [SPM] Model selection (RFX) on a custom GLM

Dear Klass and Maria,

Thank you so much for your advices! The only problem left now is calculation of log-evidences.

The reason I'm reluctant in using AIC or BIC in approximating log-evidences
is that my explanatory variables are correlated to each other,
and I read that AIC and BIC estimate is not accurate in this cases.

1.
Could you tell me how this situation biases the model selection?
In other words, does AIC or BIC unjustly favor models with *less* variables than the 'real' log-evidences,
if the variables are correlated to each other?

2.
Regarding the log-evidences, I'm considering using 'Bayesian 1st level estimation' with 'Log-evidence map' option on,
feeding a custom image composed of an IC's time course.
(which has a dimension of 1 x 1 x 1 x (number of time points) in x,y,z,t respectively.)

However, as far as I know, Bayesian estimation in SPM8 utilizes much information calculated from the data,
and since this image does not represent a regular brain (its spatial dimension is 1x1x1 !),
I concern if the algorithm will work righteously.

Could someone tell me if this will be a problem? i.e. feeding 1x1x1xt image to Bayesian 1st level estimation, to compute Log-evidence?
If so, how could I work around this problem?

Best wishes,
Hyoung-Ryul



On Wed, Aug 25, 2010 at 6:42 AM, Maria Joao <[log in to unmask]> wrote:
Dear Klaas and Hyoung-Ryul Kang,

The routines for computing BMS maps do not include any function to compute the log-evidences. 
These have to be computed before doing the BMS analysis.

Best wishes,
Maria


On Mon, Aug 23, 2010 at 4:43 PM, Klaas Enno Stephan <[log in to unmask]> wrote:
Dear Hyoung-Ryul Kang,

Concerning the first point, I wonder whether Maria's routines for computing BF maps may include a function that computes the log-evidence for a given GLM.  Maria, could you let the list know?
If not, you could compute AIC or BIC values for your GLM in order to approximate the log-evidence..

Concerning your 2nd question, you can simply pass a matrix of (approximated) log-evidences to spm_BMS.  The commentary to this function tells you how to use it and what it delivers:

function [alpha,exp_r,xp] = spm_BMS(lme, Nsamp, do_plot, sampling, ecp, alpha0)
% Bayesian model selection for group studies
% FORMAT [alpha, exp_r, xp] = spm_BMS (lme, Nsamp, do_plot, sampling, ecp, alpha0)
%
% INPUT:
% lme      - array of log model evidences
%              rows: subjects
%              columns: models (1..Nk)
% Nsamp    - number of samples used to compute exceedance probabilities
%            (default: 1e6)
% do_plot  - 1 to plot p(r|y)
% sampling - use sampling to compute exact alpha
% ecp      - 1 to compute exceedance probability
% alpha0   - [1 x Nk] vector of prior model counts
%
% OUTPUT:
% alpha   - vector of model probabilities
% exp_r   - expectation of the posterior p(r|y)
% xp      - exceedance probabilities


Best wishes
Klaas





Von: Hyoung-Ryul Kang <[log in to unmask]>
An: Klaas Enno Stephan <[log in to unmask]>
Gesendet: Samstag, den 21. August 2010, 10:24:43 Uhr
Betreff: Re: Model selection (RFX) on a custom GLM

Dear Dr. Stephan,

I'm trying to apply Bayesian model selection on GLMs. Since these GLMs are about the time courses of several independent components (ICs) from ICA,
I cannot use the comfortable BMS functionality in SPM8 GUI.

Could you give me an advice on which functions in SPM8 I can use in this case? 

I think two kinds of functions will be needed:

1. Estimating individual log evidence from a given set of parameters (for a GLM) and the data (one subject's time course of an IC)
2. Performing RFX across subjects on the above individual log evidences

Which spm8 functions would be appropriate for the above steps? I tried to figure them out myself, but there were many functions that seems to be interrelated, so it was difficult to find ones that are for me..

Best regards,
Hyoung-Ryul Kang


On Sat, Aug 21, 2010 at 5:02 PM, Hyoung-Ryul Kang <[log in to unmask]> wrote:
Dear Dr. Stephan,

I'm trying to apply Bayesian model selection on GLMs. Since these GLMs are about the time courses of several independent components (ICs) from ICA,
I cannot use the comfortable BMS functionality in SPM8 GUI.

Could you give me an advice on which functions in SPM8 I can use in this case? 



--
Hyoung-Ryul Kang, M.D.
Public Health Physician, Gyodong Public Health Center, Incheon, South Korea






--
Hyoung-Ryul Kang, M.D.
Public Health Physician, Gyodong Public Health Center, Incheon, South Korea