[Distutils] GLM analysis questions

Abduljalil Sireis kentman234 at gmail.com
Wed Jan 9 02:21:01 CET 2013

Dear all,

I would like to ask questions about structural solution for GLM analysis of
fMRI data. I hope it is not a problem for such long description! :)

The subjects of our experiment see two types of video clips. One type is
dangerous car accidents and the other is normal car advertisements. We have
number of subjects perform this task with one session per subject. Each run
consists of 6 clips from each type, the two successive spots are separated
by black screen and a yellow cross to fix the subjects eyes. There was not
a specific order of the spots but more than two successive ones of the same
type were not allowed. All videos were accompanied with voice, so we have
visual and audio stimulation.

Attached with this email a table of onsets,durations and indices of both

TR (scan repeat time) = 3000 ms. Functional measurement consists of 220

Here is a formulation of the steps needed to be done in the analysis:

The GLM analysis that needs to be performed to get the beta estimates is a
multiple regression analysis. In other words, I need to specify a model
that includes predictors (one predictor for each condition, a confound-mean
predictor (all-one vector), and optionally head-motion and trend
predictors), and then to fit this model to the data to obtain the

In order to run the GLM, I first need to assemble the model. For this, I
can use the list containing the onsets and durations and indices of the
stimuli. The next step is to create a predictor for each condition. For
each condition, I start off with a vector (220 elements, one for each
timepoint) of zeros, then I put ones at those timepoints at which that
specific condition was presented. After that, I convolve these predictors
with the hemodynamic response function (2-gamma or Boynton) to make the
predictors resemble the timing and shape of BOLD measurements. I can add
additional predictors to the model, i.e. nuisance predictors that model out
effects of motion and slowly-varying trends. I also have to include a
confound-mean predictor (i.e. an all-one vector) to model the mean level of
brain activation. All predictors together form the model.

Since the block durations are not multiples of the TR, it is needed to
convolve the hemodynamic response function with the cognitive predictors
(one for condition 1, and one for condition 2) at millisecond resolution,
and then to subsample the result to get the predicted response at the TR
resolution (one measurement each 3 s).

There is a very unclear thing to me relating to predictors. What should I
do exactly in multiplying the HRF with the cognitive predictors? I mean,
how the cognitive predictors can be created using the data i have? And also
the HRF function. Then what are the steps needed to do the subsample?
Better also with the sense of nipype, i have already installed the software
but never used it before.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130109/19cd2b0d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Onsets and Durations.docx
Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
Size: 16078 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130109/19cd2b0d/attachment-0001.docx>

More information about the Distutils-SIG mailing list