GLM description file

Each data file in the GLM analysis has a corresponding file, typically using an extension of “.glm”, that describes the file. The first line in the file contains the time step per time point, which often is the TR of the MRI sequence. Subsequently, blank lines indicate the start of each new event.

The general form for an event specification is

   [ID] [shape] [optional parameters]

   [start] [stop] [magnitude]

   [start] [stop] [magnitude]


The default value of shape is “square”. Alternative shapes to “square” with the same format are “ramp-up” and “ramp-down”.

A example square event is

    L square

    30 60

    90 120

    150 180


[blank line to terminate and specify a new event]

Gamma and sigmoid events do not require stop times, because they continue to the end of the run. A gamma event lists the time-to-peak response after the “gamma” keyword (see sidebar). Multiple instances of the shape can be specified, if desired, by multiple starting times. If a second value appears after the starting time, it will be a relative magnitude. For instance, one can choose a shape that fixes the ratio of two injections within a single regressor according to a hypothesized dose response. Alternatively, fit the two injections using 2 different events. A sigmoid event follows the same format as the gamma event. The gamma and sigmoid events are used to describe drug responses that resolve back to baseline (gamma) or not (sigmoid). If x=(t-start)/tau, then the gamma shape is x*exp(1-x), and the sigmoid shape is x/sqrt(1+x*x).

Table events simply list the column index in the corresponding table file. See the sidebar.

Joseph B. Mandeville, Athinoula A. Martinos Center for Biomedical Imaging at MGH/MIT/Harvard