Dear Arkan
Unfortunately, I don't think spectral DCM is set up yet for hidden nodes (perhaps any of the spectral DCM experts on the Mailing List will correct me).
When you set a node to be hidden, a prior is set (with high confidence) that the region has very low SNR. After tweaking your script a little (to include the missing region in DCM.xY and DCM.Y, with a timeseries of all zeros or all ones), the hidden node can successfully be estimated using timeseries DCM, but spectral DCM gives the error listed below.
I will let you know if we have an update on this issue.
Best
Peter
Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN.
> In spm_inv (line 30)
In spm_mar (line 162)
In spm_dcm_fmri_csd_data (line 84)
In spm_dcm_fmri_csd (line 213)
Error using eig
Input to EIG must not contain NaN or Inf.
Error in spm_kl_eig_normal (line 24)
[v,eigvals]=eig(c_q);
Error in spm_mar (line 174)
kl_weights=spm_kl_eig_normal(w_mean(:),w_cov,prior_cov);
Error in spm_dcm_fmri_csd_data (line 84)
mar = spm_mar(DCM.Y.y,p);
Error in spm_dcm_fmri_csd (line 213)
DCM = spm_dcm_fmri_csd_data(DCM);
-----Original Message-----
From: SPM (Statistical Parametric Mapping) <[log in to unmask]> On Behalf Of Arkan
Sent: 26 June 2019 10:16
To: [log in to unmask]
Subject: [SPM] Spectral DCM with a hidden node
Dear SPM list,
We have a dataset of resting-state fMRI data and we would like to do a spectral DCM with a hidden node. We have 3 regions of interest and one brain region where data was not collected as our hidden node. The first question is:
Is it possible to implement a hidden into a spectral DCM analysis?
We used the below Matlab script, which was previously used for spectral DCM analysis and added the following code to hide node number 4: DCM.options.hidden =[4]. In our script, we had a full-connectivity model.
% Connectivity Model, STN as a hidden node
a1_STN=[1,1,1,1;1,1,1,1;1,1,1,1;1,1,1,1];
% ROIs
cd(ROI_dir)
load('VOI_PFC_OFF_1.mat');
DCM.xY(1) = xY;
load('VOI_Cerebellum_OFF_1.mat');
DCM.xY(2) = xY;
load('VOI_Thalamus_OFF_1.mat');
DCM.xY(3) = xY;
% Metadata
v = length(DCM.xY(1).u); % number of time points
n = length(DCM.xY); % number of regions
n = n+1; % number of regions + hidden node
DCM.v = v;
DCM.n = n;
% Timeseries
RT=2;
DCM.Y.dt = RT;
DCM.Y.X0 = DCM.xY(1).X0;
DCM.Y.Q = spm_Ce(ones(1,n)*v);
for i = 1:DCM.n-1
DCM.Y.y(:,i) = DCM.xY(i).u;
DCM.Y.name{i} = DCM.xY(i).name;
end
% Task inputs
DCM.U.u = zeros(v,1);
DCM.U.name = {'null'};
DCM.a = a1_STN;
DCM.b = zeros(n,n,0);
DCM.c = zeros(n,0);
DCM.d = zeros(n,n,0);
% Timing
DCM.TE = 0.05; %%TE Time
DCM.delays = repmat(RT/2,DCM.n,1);
% Options
DCM.options.hidden =[4];
DCM.options.analysis = 'CSD';
DCM.options.induced = 1;
P=DCM;
[DCM] = spm_dcm_fmri_csd(P);
We got than the following error message:
% Estimating DCM :
Error using spm_nlsi_GN (line 366)
Convergence failure.
Error in spm_dcm_fmri_csd (line 201)
[Ep,Cp,Eh,F] = spm_nlsi_GN(DCM.M,DCM.U,Y);
Error in DCM_specification_estimation_BMS_STN_as_hidden_node (line 138) DCM = spm_dcm_fmri_csd(fullfile(ROI_dir,str));
The second question is now: How can we practically implement the fourth node as a hidden node into our spectral DCM analysis in SPM and what exactly is the problem with the DCM model estimation?
Thanks in advance!
Arkan
|