Dear All,
Using the 'model' batch mode in SPM99 (which is a nice feature), I
encoutered, I believe, a bug in spm_get_ons.m or in the batch mode:
In the GUI, SPM asks you for 'variable durations' for each trial.
This works fine, provided that you model those trial as event (as
mentioned in the spm-list).
In the batch mode, however, you specify 'conditions(n).variable_dur'
for all trials together. As a result you need to specify durations
for all trial (even for those with a priori fixed durations):
conditions(n).durations={vector_dur1, vector_dur2, ...}
with some null vectors for fixed epochs or events.
In this way, this works fine and produces appropriate design matrix
provided that you change a piece of code in spm_get_ons.m (a bug?):
Replace this (i in bold)
% get durationa
%-----------------------------------------------
dur = {};
for j = 1:length(on)
dur{j} = zeros(size(on{j}));
if length(on) == 1
str = 'variable durations';
if spm_input(str,'+1','y/n',[1 0],2,'batch',...
{'conditions',s},'variable_dur')
dur{j} = spm_input('durations (scans)',...
'+1','e',[],[1
length(on{j})],'batch',...
{'conditions',s},'durations',j);
dur{j} = round(dur{j}*T);
end
end
end
by this (j in bold)
% get durationa
%-----------------------------------------------
dur = {};
for j = 1:length(on)
dur{j} = zeros(size(on{j}));
if length(on) == 1
str = 'variable durations';
if spm_input(str,'+1','y/n',[1 0],2,'batch',...
{'conditions',s},'variable_dur')
dur{j} = spm_input('durations (scans)',...
'+1','e',[],[1
length(on{j})],'batch',...
{'conditions',s},'durations',i);
dur{j} = round(dur{j}*T);
end
end
end
Note that it makes no difference when using GUI.
Let me know whether I am right or not. Thank you
Etienne.
Etienne Koechlin, PhD.
--------------------------------------------
Cognitive Neuroscience Section
National Institute of Health
MNB/NINDS/Bdg 10, Room 5c206
BETHESDA, MD 20892, USA
Tel: (301) 435-1583
Fax: (301) 480-2909
INSERM U483
Universite Pierre et Marie Curie,
9 quai St bernard,
75005 PARIS, FRANCE
Tel: (1) 44 27 37 47
Fax: (1) 44 27 34 38
---------------------------------------------
|