Open PasqualeDellaRosa opened 2 years ago
Dear Pasquale,
Thank you very much for your interest in rDCM and my apologies for not having responded earlier to your message. The pre-Christmas time is always extremely busy and I simply did not have the time to take a closer look at your issue earlier.
Regarding your question: I think it is a fantastic idea to combine rDCM with SPM-PEB. In fact, I have already implemented a function that will transform the rDCM output structure into an SPM-compatible format that can then also be used with the standard SPM routines. This will also included the PEB routines. The function that does the transformation from rDCM to SPM output will be included in the rDCM toolbox in the next release of TAPAS.
I have quickly looked at your code. I did not have the time to go through it thoroughly, but I think it looks fine in principle. The only problem is that there was a small bug in the code for computing Cp
out of the region-wise posterior covariance matrices. Specifically, the cross-covariance terms were not assigned correctly. This is not an issue for classical rDCM analyses (as you typically work with the region-wise covariance matrices), but it will lead to false estimates when using PEB (which requires the full Cp). My sincere apologies for this - it will be corrected in the new version of the rDCM toolbox.
I think the best way forward would be if you use the update of the code that I have written to convert rDCM to SPM format. I will double-check when we will have our next planed TAPAS release. If this is too far in the future and/or you need the script more urgently, I can also share the function with you privately prior to the release.
Apart from that, there is a couple of things to consider:
I hope this is helpful. And once again, my apologies for the slow response.
With very best wishes, Stefan
Dear Stephan,
I have written you and Peter an email some time ago, as the topic concerned rDCM in a PEB modeling framework, but I’m not sure you have received it so I will post our issue as a rDCM topic on the TAPAS GitHub discussion forum as well, hoping that you can reach out back to us.
We are currently working on a rs-fMRI dataset and our idea is to take rDCM estimated models at the 1st level to a 2nd group-level PEB approach. As you have mentioned previously on the forum, rDCM output does not store the information that is required for PEB, so we wrapped up some code to dress the rDCM estimated output with a DCM structure resembling the DCM model estimation output in order to get it to 2nd level PEB. I will summarize the steps we took
DCM Analysis: First Level Model Specification
A template DCM model was specified for 3 Models
DCM specification parameters were the following:
rDCM 1st subject-level model estimation (i.e. tapas_rdcm_estimate.m).
rDCM model estimation output conversion to DCM structure for 2nd group-level PEB
_see “convert_rDCM_toDCM.m code attached
PEB 2nd group-level (i.e. specify/estimate batch from SPM’s GUI)
PEB specify/estimate parameters
Thanking you very much in advance for any kind of help and input you may give us. I believe that it would be great to combine rDCM at the subject level with PEB for group analyses, however I would really appreciate your advice before moving on to be completely sure that our approach and steps are fully plausible and hold or if we should instead move outside of the SPM-PEB framework and approach group-level stats outside SPM anyway on values extracted from rDCM single-subject estimated matrices.
If you should need the DCM input and DCM output matrices going in and coming out of our code for PEB just let me know where I could upload them for you, as the files are too heavy to attach to an email. I’ll attach the convert_rDCM_to_DCM.m code and rDCM estimate_output.mat here.
Thanking you very much in advance for your help and support! All the best Pasquale
rDCM_PEB_PADR.zip