Foucher Jack wrote:
>
> Dear SPMers
>
> Could anybody help me in designing dispertion and temporal derivatives from the
> hrf. I found the usefull spm_hrf function for the last. How to compute the
> former from it ?
> Thanks for any input.
The code is in spm_get_bf.m. The relevant bit is:
% hrf and derivatives
%-------------------------------------------------------
[bf p] = spm_hrf(dt);
% add time derivative
%-------------------------------------------------------
if Cov == 2 | Cov == 3
dp = 1;
p(6) = p(6) + dp;
D = (bf(:,1) - spm_hrf(dt,p))/dp;
bf = [bf D(:)];
p(6) = p(6) - dp;
% add dispersion derivative
%-----------------------------------------------
if Cov == 3
dp = 0.01;
p(3) = p(3) + dp;
D = (bf(:,1) - spm_hrf(dt,p))/dp;
bf = [bf D(:)];
end
end
where the parameters in "p" define the shape of the
canonical HRF (eg its lag), and are incremented to
create the partial derivative with respect to time
(actually a finite difference) and the partial
derivative with respect to width (dispersion; again a
finite difference). Note that these derivatives are
slightly correlated, and are subsequently sequentially
orthogonalised.
---------------------------8-{)}-------------------------
DR R HENSON EMAIL [log in to unmask]
Wellcome Department of
Cognitive Neurology TEL (work1) +44 (0)20 7833 7483
12 Queen Square TEL (work2) +44 (0)20 7833 7472
London, WC1N 3BG FAX +44 (0)20 7813 1420
URL: http://www.psychol.ucl.ac.uk/rik.henson/index.html
---------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|