Dear Michel
Yes unfortunately this suggests that there was no evidence for any of your parameters. I recommend going back to the first level of analysis and checking your DCMs. E.g. if this is fMRI, run spm_dcm_fmri_check(DCM).
Best
Peter
-----Original Message-----
From: SPM (Statistical Parametric Mapping) <[log in to unmask]> On Behalf Of Michel Akselrod
Sent: 11 December 2019 09:57
To: [log in to unmask]
Subject: [SPM] spm_dcm_peb_bmc error "Unrecognized function or variable 'F'"
Hi,
I am conducting a dcm peb analysis and I just encountered an error I had never seen before (using a similar script). There are also no mention of such error in the mailing list. So here it is:
Here is the code I use:
M = struct();
M.alpha = 1;
M.beta = 16;
M.hE = 0;
M.hC = 1/16;
M.Q = 'single';
M.X = ones(N,1); % Group mean
M.Xnames = {'Mean'};
%% Amat
% Choose field
field = {'A'};
% Estimate model
[PEB, GCM_updated] = spm_dcm_peb(GCM_estimated,M,field);
GCM = GCM_updated;
save('A_GCM_updated.mat','GCM','-v7.3')
save('A_PEB.mat','PEB');
% Bayesian model comparison/prunning
BMA = spm_dcm_peb_bmc(PEB);
save('A_BMA.mat','BMA','-v7.3');
fprintf('\nprunning for A mat done\n')
And here is the error I receive:
VL Iteration 1 : F = -159705.17 dF: 0.0000 [-3.75]
VL Iteration 2 : F = -155847.17 dF: 3857.9991 [-3.50]
VL Iteration 3 : F = -152721.40 dF: 3125.7738 [-3.25]
VL Iteration 4 : F = -150294.05 dF: 2427.3518 [-3.00]
VL Iteration 5 : F = -148491.23 dF: 1802.8134 [-2.75]
VL Iteration 6 : F = -147119.44 dF: 1371.7972 [-2.50]
VL Iteration 7 : F = -146037.37 dF: 1082.0672 [-2.25]
VL Iteration 8 : F = -145117.30 dF: 920.0668 [-2.00]
VL Iteration 9 : F = -144214.91 dF: 902.3927 [-1.75]
VL Iteration 10 : F = -143068.49 dF: 1146.4243 [-1.50]
VL Iteration 11 : F = -140653.82 dF: 2414.6699 [-1.25]
VL Iteration 12 : F = -138847.31 dF: 1806.5029 [-1.00]
VL Iteration 13 : F = -846030.86 dF: 1806.5029 [-2.00]
VL Iteration 14 : F = -158630.62 dF: 1806.5029 [-3.00]
VL Iteration 15 : F = -177497.22 dF: 1806.5029 [-4.00]
VL Iteration 16 : F = -138257.16 dF: 590.1537 [-3.75]
VL Iteration 17 : F = -140759.03 dF: 590.1537 [-4.75]
VL Iteration 17 : F = -140759.03 dF: 590.1537 [-4.75]
8 out of 50 free parameters removed
8 out of 42 free parameters removed
8 out of 34 free parameters removed
8 out of 26 free parameters removed
8 out of 18 free parameters removed
8 out of 10 free parameters removed
2 out of 2 free parameters removed
Unrecognized function or variable 'F'.
Error in spm_dcm_bma (line 124)
F = sum(F,1);
Error in spm_dcm_bmr_all (line 256)
BMA = spm_dcm_bma(BMA);
Error in spm_dcm_peb_bmc (line 93)
[BMA,x,bma] = spm_dcm_bmr_all(PEB);
The same code worked fine in m yprevious analyses and also it works fine for the B and C matrices. The error only occurs when pruning the matrix A.
I suspect that "2 out of 2 free parameters removed " might be the problem as all free parameters are removed (there were free parameters left with matrices B and C).
So I would like to kindly ask whether there is a way to fix this problem.
Thanks a lot in advance for any help.
Best regards,
Michel Akselrod
|