Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate synthetic data using parameters from rDCM on rs-fMRI data? #116

Open
peterjbedford opened this issue Jan 15, 2021 · 1 comment
Open
Assignees
Labels
rdcm Issues related to regression DCM

Comments

@peterjbedford
Copy link

peterjbedford commented Jan 15, 2021

Hello,

Before reading more background, to summarize, our question is:
Is it possible to create synthetic data from parameters found from using rDCM on empirical rs-fMRI data?

We are attempting to check sensitivity specificity (following the example provided in tapas_rdcm_tutorial) for connectivity parameters we have estimated through using rDCM on empirical rs-fMRI data. As has been suggested, no U was supplied for input for tapas_rdcm_estimate. To check sensitivity specificity, we needed to generate synthetic data from the estimated parameters. We were unable to do so without a U.u input vector, so we used the technique described in the Figure 1B caption in Regression dynamic causal modeling for resting-state fMRI to generate synthetic endogenous fluctuations.

The tapas_rdcm_generate continues to crash due to dcm_euler_integration in tapas_dcm_euler_gen. We've found that there are several elements required for this function which are nonzero for the tutorial data, but which are all zero and wrong dimension sizes in the rDCM output from our data:

  • transit
  • decay
  • epsilon
  • C matrix

We've tried hardcoding nonzero values for these, but dcm_euler_integration continues to crash. This led us to try using our synthetic endogenous fluctuation as U.u in a 're-done' rDCM analysis on our data (contrary to the suggestion to leave that field empty for rs-fMRI data). The missing elements, listed above, are now present in the new output, but we've run into a new index matrix dimension mismatch error. Since this approach goes against what has been suggested for rs-fMRI, We thought we would ask for more details about the proper approach before proceeding.

Thank you in advance for any help!

@StefanFraessle
Copy link
Collaborator

Hi Peter,

Thanks for your question and for your interest in the rDCM toolbox - we hope it proves useful for you.

As you correctly indicate, due to the current formulation of rDCM for resting-state fMRI data, it is not possible to directly generate synthetic time series from the model. In that sense, rDCM is no longer a "truly" generative model - something that we also discuss in the "Regression dynamic causal modeling for resting-state fMRI" preprint that you highlighted.

However, there is a pragmatic way around that by following the procedure that we have used in the preprint. You already hint at this as well. However, it is probably important to note that the generation of the synthetic data is not performed by using the rDCM routines (i.e., dcm_euler_integration.m) but by making use of a classical DCM (as implemented in SPM) and thus the SPM routines. Specifically, we adapted the script DEM_demo_induced_fMRI.m from the SPM package, which has been crafted by Adeel Razi to do essentially the same thing for spectral DCM (where you also cannot easily generate synthetic time series as the model operates on cross-spectral densities).

If you follow that approach, you could simply use the default prior mean as the parameters for transit, decay and epsilon. Furthermore, you could set the driving input parameters (C matrix) to ones as this will only affect the scaling of the synthetic data but not the (range of) oscillations you generate. This is exactly the procedure that has also been used by Adeel and which is implemented in the function I mentioned above

This would be my suggestion - under the caveat that you should be aware that the model that you are using to generate the synthetic data (i.e., classical DCM with AR(1) driving input) is different from the one that has been used to invert the model (rDCM).

I hope this helps. Please let me know if you encounter any problems or have further questions.

All the best,
Stefan

@StefanFraessle StefanFraessle self-assigned this Sep 29, 2021
@StefanFraessle StefanFraessle added the rdcm Issues related to regression DCM label Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rdcm Issues related to regression DCM
Projects
None yet
Development

No branches or pull requests

2 participants