Good morning,

I have some questions regarding the new DCM for fMRI using a canonical microcircuit as the neural model (Friston et al. 2017).

I managed to run the analysis on the example attention to visual motion data set using the spm demo DEMO_dcm_fmri_nnm.m but I am struggling to apply the method to my own fMRI data.

For my regular DCM analysis I used a model including 3 regions A<-->B<-->C and 2 experimental Variables, with exp1 serving as input to area A and exp2 modulating the connection strength between area A and B. To see how the new DCM compares to my results I tried implementing it with exp1 as input to area A (as specified in the C matrix) and exp2 modulating forward and backward connectivity between areas A and B (as specified in the forward and backward B matrices). Inverting this model, however, results in an error:

Error using spm_nlsi_GN (line 366)

Convergence failure.

Error in spm_dcm_fmri_nmm (line 206)

[Ep,Cp,Eh,F] = spm_nlsi_GN(M,U,Y);

Further debugging gave me this:

Index exceeds matrix dimensions.

Error in spm_fx_hdm (line 47)

f(i,:) = spm_fx_hdm(x(i,:),u(i),H);

Error in spm_diff (line 80)

f0 = f(x{:});

Error in spm_diff (line 123)

[f0{:}] = spm_diff(f,x{:},n(1:end - 1),V);

Error in spm_bireduce (line 77)

[dfdxu,dfdx] = spm_diff(funx,M.x,u,P,M,[1 2]);

Error in spm_int (line 97)

[M0,M1] = spm_bireduce(M,P);

Error in spm_gen_fmri (line 208)

y = spm_int(P.H,H,U);

Error in spm_diff (line 80)

f0 = f(x{:});

It seems that in spm_fx_hdm.m Matlab iterates over the entries in u (size(u,2) = 2 because number of experimental inputs = 2) using indices 1:numel(P.decay), which is 3 because I have 3 areas in my model. I take from this that for this analysis to run I must have the same number of experimental inputs specified in U as I have brain areas. To test this, I reduced my model to only 2 areas (A and B) and it worked (or at least I did not get an error) and I reduced the example attention to visual motion analysis to use only two experimental inputs (photic, attention) while keeping 3 brain areas in the model and I got the same error as above.

So here are my questions: Am I correct in assuming that for the new DCM to run I have to have the same number of experimental inputs specified in U as I have brain areas? If so, what is the theoretical motivation for it? And finally, is there a way to change the analysis to allow for fewer experimental inputs than areas is the model?

Thanks a lot!

I have some questions regarding the new DCM for fMRI using a canonical microcircuit as the neural model (Friston et al. 2017).

I managed to run the analysis on the example attention to visual motion data set using the spm demo DEMO_dcm_fmri_nnm.m but I am struggling to apply the method to my own fMRI data.

For my regular DCM analysis I used a model including 3 regions A<-->B<-->C and 2 experimental Variables, with exp1 serving as input to area A and exp2 modulating the connection strength between area A and B. To see how the new DCM compares to my results I tried implementing it with exp1 as input to area A (as specified in the C matrix) and exp2 modulating forward and backward connectivity between areas A and B (as specified in the forward and backward B matrices). Inverting this model, however, results in an error:

Error using spm_nlsi_GN (line 366)

Convergence failure.

Error in spm_dcm_fmri_nmm (line 206)

[Ep,Cp,Eh,F] = spm_nlsi_GN(M,U,Y);

Further debugging gave me this:

Index exceeds matrix dimensions.

Error in spm_fx_hdm (line 47)

f(i,:) = spm_fx_hdm(x(i,:),u(i),H);

Error in spm_diff (line 80)

f0 = f(x{:});

Error in spm_diff (line 123)

[f0{:}] = spm_diff(f,x{:},n(1:end - 1),V);

Error in spm_bireduce (line 77)

[dfdxu,dfdx] = spm_diff(funx,M.x,u,P,M,[1 2]);

Error in spm_int (line 97)

[M0,M1] = spm_bireduce(M,P);

Error in spm_gen_fmri (line 208)

y = spm_int(P.H,H,U);

Error in spm_diff (line 80)

f0 = f(x{:});

It seems that in spm_fx_hdm.m Matlab iterates over the entries in u (size(u,2) = 2 because number of experimental inputs = 2) using indices 1:numel(P.decay), which is 3 because I have 3 areas in my model. I take from this that for this analysis to run I must have the same number of experimental inputs specified in U as I have brain areas. To test this, I reduced my model to only 2 areas (A and B) and it worked (or at least I did not get an error) and I reduced the example attention to visual motion analysis to use only two experimental inputs (photic, attention) while keeping 3 brain areas in the model and I got the same error as above.

So here are my questions: Am I correct in assuming that for the new DCM to run I have to have the same number of experimental inputs specified in U as I have brain areas? If so, what is the theoretical motivation for it? And finally, is there a way to change the analysis to allow for fewer experimental inputs than areas is the model?

Thanks a lot!

Pia