Dear SPM community,
I am using SPM version 7771 to perform a leave one out cross validation
analysis. I want to test if the significant between-subjects effects I
find are stable across subjects. I get an error related to the design
matrix M.X, since I am only interested within the group, my M.X is a
columns of ones which leads to an error.
The design matrix I tried is:
% Specify PEB model settings
M = struct();
M.alpha = 1;
M.beta = 16;
M.hE = 0;
M.hC = 1/16;
M.Q = 'single';
% Specify design matrix for N subjects
M.X = ones(N,1);
% Choose field
field = {'A','B'};
[qE,qC,Q] = spm_dcm_loo(GCM,M,field);
I get the following error:
Index in position 2 exceeds array bounds (must not exceed 1).
Error in spm_dcm_ppd (line 88)
bC = var(X(:,iX))*4;
Error in spm_dcm_loo (line 82)
[Ep,Cp,P] = spm_dcm_ppd(DCM(i),DCM(j,1),M.X(i,:),M.X(j,:),field);
Error in loo_PEB_5REG_subjects_peb (line 38)
[qE,qC,Q] = spm_dcm_loo(GCM,M,field);
How can I proceed with this error? Kindly advice.
Thank you.
Shrikanth
|