Dear Barbara
Here's how to change the priors in a DCM:
1. As a starting point, estimate a model, so you have (posterior) parameter estimates DCM.Ep and covariance matrix DCM.Cp to use as a template.
2. To be consistent with SPM nomenclature, you could rename the posteriors as follows before using them as priors:
pE = DCM.Ep;
pC = DCM.Cp;
3. Modify pE and pC as you wish.
4. Specify a model using the GUI and load it into the workspace and set your new priors:
DCM.options.pE = pE;
DCM.options.pC = pC;
5. If the DCM is previously estimated, you'll need to clear out the old priors:
DCM = rmfield(DCM,'M');
6. Save the modified DCM and estimate it. Following estimation, the priors will be stored in DCM.M.pC and DCM.M.pE.
Note that the default priors for DCM for fMRI are set in spm_dcm_fmri_priors.m , which is called by spm_dcm_estimate.m, unless you override it in step 4 above. You might also find the following code snippet useful for working with the covariance matrix as a structure:
% Prior covariance -> structure e.g. containing pC_struct.A, pC_struct.B
pC_struct = spm_unvec(diag(pC), pE);
....
% Structure -> covariance matrix
pC = diag(spm_vec(pC_struct))
Best
Peter
-----Original Message-----
From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]] On Behalf Of Barbara Wendelberger
Sent: 03 May 2016 13:32
To: [log in to unmask]
Subject: [SPM] DCM for fMRI: specify priors for A matrix in neuronal state equations
The default prior for the estimate of the neuronal state equations’ coupling matrix A is a Gaussian shrinkage prior. I am interested in specifying the prior expectation and covariance, instead of using the default values, before running my DCM (for task fMRI). I believe that I can do this simply by changing the code in the appropriate SPM function, but I am having difficulty ascertaining which function to modify. I want to make sure that I am only editing the initial prior value.
I have done both the GUI tutorial and run the batch code that accompanies the "attention to visual motion" dataset in the SPM12 manual for DCM. I would next like to be able to estimate the DCM for this dataset with my pre-specified priors.
I truly appreciate any help identifying:
1. The function in which to modify the initial prior expectation and/or covariance 2. The line of code to do this
Thanks in advance!
|