BasicOnsetFiles - MRC CBU Imaging Wiki
location: BasicOnsetFiles

The joy of onset files.

After preprocessing, the next step is to model your data. To do this, you need to tell SPM the time (in TRs or seconds) that your events of interest occurred, and how long each event was. Things like button-press responses may be given a duration of 0, that is, instantaneous.

There are many ways of loading this information into SPM. Here is a simple way which illustrates the necessary steps to make an onset file.

For each session, there are 3 columns (tab-delimited). The first column denotes the event type (each event type that is to be modelled is assigned a number beginning at 1), the second is onset time (here in scan time (TRs), though you can use seconds), the third is the duration of the event. It doesn’t matter what order the columns are in as long as you’re consistent across all your subjects (your model can be changed to match the order you have specified). The order of rows in the file does not matter.

Here's an example. I’m modeling an experiment with 2 trial types: a control condition and an experimental condition. We'll assign them to be event types 1 and 2 in our file. Each trial can range from 0.5 TRs to 1.6 TRs long. We will also model button press responses, in this case, all are modelled as a single event type (3). You may wish to model the responses differently: for example, correct and incorrect responses (assigned to be 3 and 4 in the onset file).

1

.25

.5

1

2.8

1

1

7.9

.7

1

12.0

1.3

2

4.7

1.3

2

6.2

.8

2

10.0

1.1

2

11.2

.5

3

.75

0

3

3.8

0

3

6.0

0

3

11.7

0

The order of the rows does not matter because SPM will sort everything by onset time. Onset times start at time 0 (the beginning of the first non-dummy scan is time 0, or tr 0).

You may explicitly model ‘rest’ or your baseline condition as another trial type, or you may let SPM take all unmodeled event time as your ‘implicit’ baseline. The former is recommended when you don’t have a resting baseline, or when you are not modeling all events that occur, and therefore don’t want those unmodeled events to be sucked into an implicit baseline. If you are modeling all events except rest or null trials, an implicit baseline works fine.

Once you have made these onset files for each session and each subject you may run your analysis. You may end up making several versions of onset files and model files if you are analyzing your data in different ways.

CbuImaging: BasicOnsetFiles (last edited 2013-03-07 21:22:57 by localhost)