Print

Print


Exactly :-) Call the function then:

DCM.M.pE = pE; 
DCM.M.pC = pC;

Best,
Peter

-----Original Message-----
From: Thilo Kellermann [mailto:[log in to unmask]] 
Sent: 28 October 2015 12:55
To: Zeidman, Peter <[log in to unmask]>; [log in to unmask]
Subject: Re: [SPM] DCM options.P

Dear Peter,

thanks a lot for your clarification. Unfortunately, the field M in the DCM structure is not available until the model has been inverted, for which reason it is difficult to get the correct size of pC a priori. In order to specify the field M (or better the fields pE and pC of the structure M) in the correct way I guess I should call the function spm_dcm_fmri_priors as it is done in spm_dcm_estimate (roughly at line 160):

[pE,pC,x] = spm_dcm_fmri_priors(DCM.a,DCM.b,DCM.c,DCM.d,DCM.options);

and then proceed as you explained in your mail, right?

Thanks again and best wishes,

Thilo


On 10/27/2015 05:23 PM, Zeidman, Peter wrote:
> Dear Thilo,
> DCM.P contains the starting values for the model fitting, so this is not the correct structure. If you want to specify that a parameter can't change, set the prior mean you desire in DCM.M.pE and set the prior variance to be zero. The prior covariance matrix is DCM.M.pC, so to set the 5th parameter to have fixed prior variance of zero, type:
>
> DCM.M.pC(5,5) = 0;
>
> If it is difficult to identify the correct parameter in this matrix, you can first convert it to a structure, then convert it back after:
>
> % Convert diagonal of prior covariance matrix to structure pC = 
> spm_unvec(diag(DCM.M.pC), DCM.M.pE);
>
> % Set prior variance for desired parameter
> pC.A(3,2) = 0;
>
> % Put back into matrix form
> DCM.M.pC = diag(spm_vec(pC));
>
> Best,
> Peter
>
> -----Original Message-----
> From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]] 
> On Behalf Of Thilo Kellermann
> Sent: 27 October 2015 13:13
> To: [log in to unmask]
> Subject: [SPM] DCM options.P
>
> Dear DCMers,
>
> in a DCM analysis I want to fix a "parameter" at a pre-specified value, so that it is no longer a (variable) parameter. In order to do so, I supplied the  structure "P" in the options-field of the DCM structure, where the respective value for an endogenous connection was set to 0.5 or 1 (I tried both separately). The respective value for the covariance in DCM.a was set to zero, so that the value was indeed fixed and did not vary during inversion of the model.
>
> After inversion, however, the structure containing the estimated 
> parameters (DCM.Ep) indicates that the value for that specific 
> endogenous connection was zero (and not 0.5 or 1 as specified in the 
> options). Nevertheless, other parameters of the models indeed changed 
> compared to the model without an initialization, indicating that the 
> initialization had an impact on parameter estimation. In addition, 
> however, the parameters of two structurally identical models with 
> different fixed values in options.P did not differ from each other. In 
> other words, it seemed as if it did not matter if the value was fixed 
> at
> 0.5 or 1 with respect to the impact on estimation of other free parameters (in contrast to an omission of any initialization as mentioned above).
>
> Against this background I have basically two questions:
> 1) Is our procedure suited for the described purpose in the first place?
> That is to say, is our assumption correct that initializing a 
> parameter in options.P and setting its covariance in DCM.a to zero 
> will fix this connection to the pre-specified value? (If this is not 
> correct, what would be the right way?)
> 2) If our procedure is correct, I wonder why the respective value in DCM.Ep is rather indicating zero instead of the value that has been specified in options.P.
>
> Thanks a lot in advance and
> best wishes,
>
> Thilo
>
> --
> Thilo Kellermann
> Department of Psychiatry, Psychotherapy and Psychosomatics Uniklinik 
> RWTH Aachen JARA Translational Brain Medicine Pauwelsstr. 30
> 52074 Aachen
> Germany
> Tel.: +49 (0)241 / 8089977
> Fax.: +49 (0)241 / 8082401
> E-Mail:[log in to unmask]
>