Hi DCM experts,
I have a problem on DCM batch code with 8 VOI. I just finished time series extractin with batch code, which was so fast! Thank you so much! Now I am trying to use batch code to finish DCM specification and estimation. From your example code with three VOI, I made this code below, but I am not sure about it. I just loaded 8 VOI.mat files, and made some changes to the matrix, in which I set all intrinsic connections for the 8 VOI in matrix a, and the first V1 as driving input for all stimuli in matrix c; one connection from V1 to another in marix b for emotional stimuli. Do I need to change some parameters in the middle of the code? Please help to check! Thanks.
% DYNAMIC CAUSAL MODELLING
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear DCM
% SPECIFICATION DCM "attentional modulation of backward connection"
%--------------------------------------------------------------------------
load(fullfile('/ccm/home/10420/GLM/SPM.mat'));
load(fullfile('/ccm/home/10420/GLM/VOI_V1_1.mat'),'xY');
DCM.xY(1) = xY;
.
.
.
.
.
.
load(fullfile('/ccm/home/hyang/stroopstudy/DCM/prepatients/10420/GLM/VOI_Rstriatum_1.mat'),'xY');
DCM.xY(8) = xY;
DCM.n = length(DCM.xY); % number of regions
DCM.v = length(DCM.xY(1).u); % number of time points
DCM.Y.dt = SPM.xY.RT;
DCM.Y.X0 = DCM.xY(1).X0;
for i = 1:DCM.n
DCM.Y.y(:,i) = DCM.xY(i).u;
DCM.Y.name{i} = DCM.xY(i).name;
end
DCM.Y.Q = spm_Ce(ones(1,DCM.n)*DCM.v);
DCM.U.dt = SPM.Sess.U(1).dt;
DCM.U.name = [SPM.Sess.U.name];
DCM.U.u = [SPM.Sess.U(1).u(33:end,1) ...
SPM.Sess.U(2).u(33:end,1) ...
SPM.Sess.U(3).u(33:end,1)];
DCM.delays = repmat(SPM.xY.RT,3,1);
DCM.TE = 0.04;
DCM.options.nonlinear = 0;
DCM.options.two_state = 0;
DCM.options.stochastic = 0;
DCM.options.nograph = 1;
DCM.a = [1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1];
DCM.b = zeros(8,8,8); DCM.b(2,1,2) = 1;
DCM.c = [1 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0];
DCM.d = zeros(8,8,0);
%save DCM "V1 to L46"
save(fullfile('/ccm/home/10420/GLM/DCM_8regions_test1.mat'),'DCM');
.
.
.
.
.
.
.
% SPECIFICATION DCM "V1 to R46"
%--------------------------------------------------------------------------
DCM.b = zeros(8,8,8); DCM.b(2,8,2) = 1;
save(fullfile('/ccm/home/10420/GLM/DCM_8regions_test8.mat'),'DCM');
% ESTIMATION
%--------------------------------------------------------------------------
DCM_bwd = spm_dcm_estimate(fullfile('/ccm/home/10420/GLM/DCM_8regions_test1.mat'));
.
.
.
.
.
.
DCM_fwd = spm_dcm_estimate(fullfile('/ccm/home/10420/GLM/DCM_8regions_test8.mat');
~~~~~~
Hongyu Yang, PhD
Research Specialist in Health Science
Pediatric Brain Research And InterventioN Center
Department of Psychiatry
1747 West Roosevelt Road, M/C 747
Chicago, Illinois 60608
Phone: (312) 413-4622
Fax: (312) 413-0063
Email: [log in to unmask]
http://www.psych.uic.edu/brain-center
|