Dear Hweeling
You don't need to call spm_dcm_bmr (you only have one DCM per subject). Your workflow should be:
1. Specify and estimate one DCM per subject
2. Take the connection strengths to the group level by specifying and estimating a PEB model
3. Compare the full PEB model against reduced PEB models where certain parameters are switched off.
So if you comment out spm_dcm_bmr.m it should be fine. Let me know if you have any further problems.
Best
Peter
-----Original Message-----
From: Hwee Ling Lee <[log in to unmask]>
Sent: 19 February 2019 08:07
To: Zeidman, Peter <[log in to unmask]>
Subject: Re: [SPM] error in PEB DCM
Dear Peter,
Sorry to trouble you again, but I'm still having problems with estimating my GCM.
Here's the error message after "spm_dcm_bmr":
Undefined function or variable "pC".
Error in spm_find_pC (line 52)
if isstruct(pC)
Error in spm_dcm_peb (line 148)
q = spm_find_pC(DCM,field); % parameter indices
Error in PEB_NC56_SCD23_14012019 (line 46) PEB = spm_dcm_peb(GCM, M, field);
I've also attached the script that I used for this purpose.
Cheers,
Hweeling
On 15/02/2019, Hwee Ling Lee <[log in to unmask]> wrote:
> Dear Peter,
>
> Thanks for the reply. The GCM variable that I created was based on the
> wiki page "https://en.wikibooks.org/wiki/SPM/Parametric_Empirical_Bayes_(PEB)".
>
> Since taking your recommendation, my PEB estimation now works.
>
> Possibly, the wiki page needs to be updated.
>
> Cheers,
> Hweeling
>
>
> On Thu, 14 Feb 2019 at 17:52, Zeidman, Peter <[log in to unmask]>
> wrote:
>
>> Dear Hweeling
>>
>> Thanks for sharing your files. The problem was that your GCM is a
>> ‘structure array’ rather than a ‘cell array’. Fixing this resolves
>> the problem. Here’s the code I used on your example DCMs that worked
>> correctly:
>>
>>
>>
>> load('DCM_DMN_01_sub00001.mat')
>>
>> DCM1=DCM;
>>
>> load('DCM_DMN_01_sub00002.mat')
>>
>> DCM2=DCM;
>>
>> load('DCM_DMN_01_sub00003.mat')
>>
>> DCM3=DCM;
>>
>> GCM = {DCM1; DCM2; DCM;}; % This needs to be a vertical cell array of
>> DCMs with one row per subject
>>
>> spm_dcm_peb(GCM)
>>
>>
>>
>> Hope that helps,
>>
>> Peter
>>
>>
>>
>> *From:* Hwee Ling Lee <[log in to unmask]>
>> *Sent:* 11 February 2019 14:22
>> *To:* Zeidman, Peter <[log in to unmask]>
>> *Subject:* Re: [SPM] error in PEB DCM
>>
>>
>>
>> Dear Peter,
>>
>>
>>
>> Thanks for your reply.
>>
>>
>>
>> I've checked the DCM.F and DCM.Ep. There are values in these variables.
>> As
>> a test, I have created the GCM variable using 3 subjects' data with
>> 17 ROIs. Is there a way to share the data with you so that I could
>> resolve this issue?
>>
>>
>>
>> Cheers,
>>
>> Hweeling
>>
>>
>>
>>
>>
>> On Mon, 11 Feb 2019 at 14:12, Zeidman, Peter
>> <[log in to unmask]>
>> wrote:
>>
>> Dear Hweeling
>> Your code looks fine. Unfortunately, this error message just says
>> something is unexpected about the DCMs, but doesn't provide detail.
>> Please
>> could you check that GCM is a cell array with one row per subject?
>> And that when you type:
>>
>> GCM{1}
>>
>> And press enter into the Matlab workspace, you either see the
>> filename of the DCM, or you see a series of fields. If you see a
>> series of fields, please could you check this includes ones named 'F'
>> and 'Ep'? If you see a filename, please could you load it in and
>> type:
>>
>> DCM
>>
>> And press enter. And then check it has fields named 'F' and 'Ep'?
>>
>> Best
>> Peter
>>
>> -----Original Message-----
>> From: SPM (Statistical Parametric Mapping) <[log in to unmask]> On
>> Behalf Of Hwee Ling Lee
>> Sent: 05 February 2019 09:20
>> To: [log in to unmask]
>> Subject: [SPM] error in PEB DCM
>>
>> Dear all,
>>
>> I have encountered an error on my DCM analyses, and I hope to get
>> some guidance to resolve the issue. I'm currently using SPM version 7487.
>>
>> I have 2 groups of participants, 56 in one group and 23 in another group.
>> I have completed the creating the GCM variable using
>> spm_dcm_bmr(GCM). I would like to compare group 1 vs. group 2 to
>> examine connectivity differences between the 2 groups.
>>
>> However, when I tried to use this code:
>>
>> M = struct();
>> M.alpha = 1;
>> M.beta = 16;
>> M.hE = 0;
>> M.hC = 1/16;
>> M.Q = 'all';
>>
>> M.X(:,1) = ones(79,1);
>> M.X(:,2) = [ones(56,1)*1; ones(23,1)*-1]; M.Xnames = {'Group mean',
>> 'Group diff'};
>>
>> field = {'A'};
>>
>> PEB = spm_dcm_peb(GCM, M, field);
>> BMA = spm_dcm_peb_bmc(PEB(1));
>>
>> I get an error message:
>>
>> Undefined function or variable "pC".
>>
>> Error in spm_find_pC (line 52)
>> if isstruct(pC)
>>
>> Error in spm_dcm_peb (line 148)
>> q = spm_find_pC(DCM,field); % parameter indices
>>
>> Thanks!
>>
>> Cheers,
>> Hweeling
>>
>>
>
--
=================================================
Dr. rer. nat. Lee, Hwee Ling
Postdoc
German Center for Neurodegenerative Diseases (DZNE) Bonn
Email 1: hwee-ling.lee<at>dzne.de
Email 2: hweeling.lee<at>gmail.com
https://sites.google.com/site/hweelinglee/home
Correspondence Address:
Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany =================================================
|