Print

Print


Thanks Ken! It turns out my problem was all hinging on my understanding
of the hrf--I've seen the "canonical" hrf presented many times, and it
always looked like the attached (cut without permission from from Daniel
A. Handwerker, John M. Ollinger, Mark D'Esposito, Variation of BOLD
hemodynamic responses across subjects and brain regions and their
effects on statistical analyses, NeuroImageVolume 21, Issue 4, , April
2004, Pages 1639-1651...).

But I'd never looked closely at the SPM one, and I didn't realize there
were several different shapes in use in the literature.  Thanks for your
help!!

Jess

-----Original Message-----
From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]]
On Behalf Of Ken Roberts
Sent: Monday, June 23, 2008 10:42 AM
To: [log in to unmask]
Subject: Re: [SPM] question re: using and intepreting spm_hrf.m

Hi Jessica,


> I'm unclear on how to interpret the output of spm_hrf: When I call it
> with a TR of 1, I get a vector of 32 entries, and when I plot them,
they
> look like the canonical HRF; but the units are neither time or TRs
> (which should be equivalent since TR = 1 s).

The units are in TRs.  Give the following code a try:

% this plots hrf with TR=1
plot(0:length(spm_hrf(1))-1, spm_hrf(1)); hold on;

% this plots hrf with TR=2
plot(0:2:2*(length(spm_hrf(2))-1), spm_hrf(2)/2, 'r')

% plots baseline
plot(0:30, zeros(31, 1), 'g');

One thing to remember is that the first element in an array is element
1, but
the first element returned by SPM represents a TR starting at time 0, or
exactly synchronous with the onset of the stimulus.  The extra code here
adjusts the x-axis so that it corresponds to seconds after stimulus
presentation.  It also normalizes the heights of the two hrfs wrt to
each
other.  Does this look better?

I see the hrf's peaking at 5s, and returning to baseline at 12s.  In my
experiments, the peak seems pretty accurate, but we generally see a
return to
baseline a little faster.  If you model with the three canonical basis
functions (hrf + time_deriv + dispersion_deriv) your data should be fit
pretty
well, even if your hrf in your experiments has a different peak latency
or
width.

> When I set up a stick function of onsets, say [1 0 0 0 0 0 1 0 0 0 0
0],
> and convolve that with the output of spm_hrf(2), ...

That should work, and give you the signal in units of TR.

Ken

----------------------------------------------------
Ken Roberts
Woldorff Laboratory
Center for Cognitive Neuroscience, Duke University
(919) 668-1334
----------------------------------------------------