Dear Kushal,
Sorry, I don't fully understand the problem you're facing.
It seems you're trying to create a DCM by writing a script. I suggest you look at the example script at:
http://www.fil.ion.ucl.ac.uk/spm/data/attention/dcm_spm8_batch.m
Alternatively, if you're unsure of the format to use DCM.U, I suggest generating a DCM model using the GUI, then loading it into the Matlab workspace and having a look at what's inside it.
Feel free to ask again if you're still stuck.
Best,
Peter.
> -----Original Message-----
> From: Kushal Kapse [mailto:[log in to unmask]]
> Sent: 24 July 2013 22:38
> To: Zeidman, Peter
> Cc: [log in to unmask]
> Subject: DCM.U.dt = SPM.Sess.U(1).dt;
>
> Hi peter and other SPM users,
>
> I am going through same issue for DCM. But my experiment is different.
> I am not able to understand how would i change code(see below), for my
> experiment. I went through spm_get_ons.m and spm_dcm_estimate.m to
> figure this out. but wasnt successful.
>
> DCM.U.dt = SPM.Sess.U(1).dt;
> DCM.U.name = [SPM.Sess.U.name(1)];
> DCM.U.u = [SPM.Sess.U(1).u(33:end,1)];
>
> I saw one more post on this which stated
> https://www.jiscmail.ac.uk/cgi-
> bin/webadmin?A2=ind1004&L=SPM&F=&S=&X=61A0FC0F022B49A505&Y=analysisthre
> ad%40gmail.com&P=580450
>
> "The DCM.U.u field contains the inputs (i.e., input vectors and
> modulatory vectors resampled into microtime). Microtime is the number
> of bins each TR is split into, and is specified by
> defaults.stats.fmri.fmri_t. The offset is specified in spm_get_ons. See
> around line 238. Therefore, if you you are using a design that has been
> setup by SPM, you should index it exactly as shown in the code you
> listed below: SPM.Sess.U(k).u(33:end,1) and so on, where k = condition
> you are indexing."
>
>
> BUT, I am still not able to figure out how i change those three lines
> for my experiment.
> I am changing the SPM-DCM code for first time for my experiment and
> hence if anyone of you guys can give me feedback on this, it would be
> helpful.
>
>
> Thanks in advance
> Kushal
>
>
> ----- Original Message -----
> From: "Peter Zeidman" <[log in to unmask]>
> To: [log in to unmask]
> Sent: Monday, April 15, 2013 10:17:00 AM
> Subject: Re: [SPM] DCM - batch
>
> Hi Carmen,
> (I'm CC'ing the mailing list in case anyone else is following this
> question.)
>
> Your models are different because the one produced using the batch
> editor has mean-centring switched on, and the one using the GUI does
> not. Not only will this change your DCM.U.u (changing the mean to
> zero), but it also alters the interpretation of your DCM results. See
> the previous message I have pasted below from Karl.
>
> (I can't guarantee there are no other differences in your models, but
> that's the most obvious one!)
>
> All the best,
> Peter.
>
> ...
> If you centre the input, it will have a mean of zero. This means that
> the modulating input will increase and decrease the extrinsic
> connectivity (A parameter); as opposed to just increasing it, if the
> input is always positive. The interpretation of the B parameter
> therefore changes in a subtle way, and becomes closer to a classical
> interaction.
>
> I hope that this helps.
> With very best wishes,
> Karl
>
> > -----Original Message-----
> > From: SPM (Statistical Parametric Mapping)
> [mailto:[log in to unmask]]
> > On Behalf Of carmen
> > Sent: 15 April 2013 09:29
> > To: [log in to unmask]
> > Subject: [SPM] DCM - batch
> >
> > Dear SPM-list,
> > I still don’t understand what exactly DCM.U.u is and why the values
> > differ between a DCM-model created by GUI and the same model created
> > by the batch code. Probably resulting from the differences here, the
> > values for DCM.Ep.A, DCM.Ep.B and DCM.Ep.C differ as well.
> > This is the code I use (model with 4 VOIs and two conditions as
> input):
> >
> >
> load(fullfile('D:\fMRI\Cannabis\Auswertung_Cannabis\Drona_R30\DCM\DCM_
> > 3
> > \GLM','SPM.mat'));
> >
> >
> load(fullfile('D:\fMRI\Cannabis\Auswertung_Cannabis\Drona_R30\DCM\DCM_
> > 3
> > \GLM','VOI_Thalamus_R_1.mat'),'xY');
> > DCM.xY(1) = xY;
> >
> load(fullfile('D:\fMRI\Cannabis\Auswertung_Cannabis\Drona_R30\DCM\DCM_
> > 3
> > \GLM','VOI_S2_R_1.mat'),'xY');
> > DCM.xY(2) = xY;
> >
> load(fullfile('D:\fMRI\Cannabis\Auswertung_Cannabis\Drona_R30\DCM\DCM_
> > 3
> > \GLM','VOI_Amygdala_L_1.mat'),'xY');
> > DCM.xY(3) = xY;
> >
> load(fullfile('D:\fMRI\Cannabis\Auswertung_Cannabis\Drona_R30\DCM\DCM_
> > 3 \GLM','VOI_Hippocampus_R_1.mat'),'xY');
> > DCM.xY(4) = xY;
> >
> > DCM.n = length(DCM.xY);
> > DCM.v = length(DCM.xY(1).u);
> >
> > DCM.Y.dt = SPM.xY.RT;
> > DCM.Y.X0 = DCM.xY(1).X0;
> > for i = 1:DCM.n
> > DCM.Y.y(:,i) = DCM.xY(i).u;
> > DCM.Y.name{i} = DCM.xY(i).name;
> > end
> >
> > DCM.Y.Q = spm_Ce(ones(1,DCM.n)*DCM.v);
> >
> > DCM.U.dt = SPM.Sess.U(1).dt;
> > DCM.U.name = cellstr([SPM.Sess.U(1).name, SPM.Sess.U(2).name]);
> > DCM.U.u = [SPM.Sess.U(1).u(33:end,1) ...
> > SPM.Sess.U(2).u(33:end,1)];
> >
> > DCM.delays = repmat(SPM.xY.RT,DCM.n,1);
> > DCM.TE = 0.04;
> >
> > DCM.options.nonlinear = 0;
> > DCM.options.two_state = 0;
> > DCM.options.stochastic = 0;
> > DCM.options.nograph = 1;
> >
> > DCM.a = [1 0 0 0 ; 1 1 0 0 ; 1 1 1 0 ; 0 0 1 1 ]; DCM.b =
> > zeros(4,4,2); DCM.b(3,1,2) = 1; DCM.c = [1 0 ; 0 0; 0 0; 0 0DCM.d =
> > zeros(4,4,0);
> >
> >
> save(fullfile('D:\fMRI\Cannabis\Auswertung_Cannabis\Drona_R30\DCM\DCM_
> > 3
> > \GLM','DCM_Model1_batch.mat'),'DCM');
> >
> >
> > Thanks a lot!!
>
|