At 16:19 09/05/2005, Helmut Laufs wrote: >Please see below... > >>At 14:52 09/05/2005, you wrote: >>>On Mon, 9 May 2005 14:28:50 +0100, Helmut Laufs <[log in to unmask]> wrote: >>> >>> >Dear Wil and list, >>> >... >>> > >>> >--------------------------------------------------------------- >>> >Model 1: >>>R:\p0414EEG\spike\analyses\spm2\appended_sess12_block_24\DCM_front_thalammat >>> > versus >>> >Model 2: >>>R:\p0414EEG\spike\analyses\spm2\appended_sess12_block_24\DCM_parietal_thalam.mat >>> > >>> >All costs are in units of binary bits >>> > >>> >Region VOI_MDN_thalamusL: relative cost = 0.00, BF= 1.00 >>> >Region VOI_prec: relative cost = 0.00, BF= 1.00 >>> >>>...and why does a region appear (VOI_prec) when comparing two models neither >>>of which it is part of? >>> >>>Thanks. >>> >>>Helmut >> >> >>Dear Helmut, >> >>this would be weird: any chance that you have inadvertently included the >>wrong VOIs into your model when specifying the DCM? Have you checked the >>names of the VOIs included in the DCMs by loading them into MATLAB and >>looking at DCM.xY.name? >> >>Best wishes, >>Klaas > >Dear Klaas, > >thank you for your reply. Yes, I have checked this before posting (and now >again). I use spm_dcm_evidence.m 2.4 [03/11/03], or going through the >code, more importantly: >spm_dcm_ui.m v2.16 (3/11/03). I think I have spotted a potential source of >the error: in line 799 which displays the region name, always DCM.Y.name >is used which corresponds to the last DCM loaded in in line 747 (going >back to my output, the SAME regions were in fact displayed for ALL pairs >of the comparison): > > for model_index=1:num_models, > load(P{model_index}); > evidence(model_index)=spm_dcm_evidence(DCM); > aic(model_index)=evidence(model_index).aic_overall; > bic(model_index)=evidence(model_index).bic_overall; > end > >While spm_dcm_evidence is called within this loop and evidence, aic and >bic are indexed, these values (I hope) will be correct when displayed in >the MATLAB control window using the following loop: > > for k=1:size(DCM.A,1), > >nats=-(evidence(ii).region_cost(k)-evidence(jj).region_cost(k)); > bits=nats/log(2); > disp(sprintf('Region %s: relative cost = %1.2f, BF= > %1.2f',DCM.Y.name{k},bits,2^(-bits))); > end > > >So maybe (if not already done in later versions) another line within the >'for model_index...' loop storing the Y.name[s] and later referring to >this one should do the trick. > >Sorry I did not try to read the code before. Could you please comment on >whether there will be a central fix (SPM2)? > >Thanks. > >Helmut Dear Helmut, I see. I understand from your following mail that you have used different VOIs in different models that you subsequently compared. This is not possible within DCM's Bayesian Model Selection (BMS) framework. The reason for this has been discussed in previous e-mails a while ago, but let me summarize very briefly: Given two models i and j, BMS rests on computing the evidence (through AIC and BIC approximations) of both models and then forming a Bayes factor as: BF(i, j) = p(y|m=i) / p(y|m=j) This means that the data y (which, in DCM, correspond to the concatenated time series of the VOIs) are assumed to be identical in both models. Thus, in DCM one cannot choose different VOIs for models that one wishes to compare by BMS. I had changed the code in spm_dcm_ui almost a year ago to prevent comparisons between models with different VOIs. The code checks whether the VOIs are identically named in both models and stops if not. Unfortunately, I forgot to put the file in the SPM2 updates directory. I have now done so, and you can download it. Best wishes, Klaas _____________________________________ Dr Klaas Enno Stephan Wellcome Dept. of Imaging Neuroscience 12 Queen Square, WC1N 3BG, London, UK phone: +44-207-8337485 fax: +44-207-8131420 web: http://www.fil.ion.ucl.ac.uk/~kstephan/