table of contents
LIPSIA     Design file format

Statistical evaluations require a specification of the experimental design which must be supplied by the user as a text file. There are two fundamentally different types of designs: first level designs and higher-level designs.

First level designs describe the experimental setup within one session. They specify onset times and duration of the various experimental events. To perform a statistical evaluation, a convolution with a hemodynamic modelling function is done.

The programs 'vcolorglm' and 'vwhiteglm' require a design matrix that is convolved with a hemodynamic modelling function. The programs 'vgendesign', 'vcatdesign', 'vaddcovariates', and 'vgetcovariates' can be used to obtain such design files from a text file as specified below.

First level design files
The design specification of first level designs must be given as a text file in the following format. Each line of the file corresponds to one trial. Each line must have 4 entries: 1. event type specified by an integer, 2. onset time in seconds, 3. trial duration in seconds, 4. amplitude. Comment lines begin with the character '%'. Here are some examples:

% 
% first level design file, example 1
%
  1       18.00        3.00        1.00
  1      150.00        3.00        1.00
  1      168.00        2.00        1.00

  2       24.00        1.00        1.00
  2       90.00        1.00        1.00
This design file describes two event types where event 1 occurs at 18,150 and 168 sec., and event 2 occurs at 24 and 90 sec. The trial lengths of event '1' are 2 or 3 seconds. Trials of event '2' have a duration of only one second. Both events have a standard amplitude of 1.

% 
% first level design file, example 2
%
  1       18.00        3.00        1.00
  1      150.00        3.00        1.00
  1      168.00        2.00        1.00

  2       24.00        1.00        1.00
  2       90.00        1.00        1.00

  3       24.00        1.00        5.80
  3       90.00        1.00        7.26
This is essentially the same design as in example 1. However, event 2 has an additional parametric component which is specified as event '3'. Note that the event therefore occurs twice, once without and once with the additional parameter.
Higher level design files
Higher-level designs are used to compute higher-level statistics such as two-sample or paired t-tests so that groups of data sets can be statistically assessed. For a higher level analysis, a design file has to be created that can be used in 'v2ndlevel'.

Note: For all higher level design files, the number of rows must coincide with the number of input files in 'v2ndlevel'.

One-sample t-test
% 
% second level design file, one-sample t-test
%
1
1
1
1
1
1
1
1
This example design can be used to perform a one-sample t-test for 8 contrast images. Each row in this file corresponds to one contrast map. The contrast vector in this case is '1'.

Note: A one-sample t-test can also be performed using the program 'vonesample_ttest' which does not require a second level design file.

Two-sample t-test
% 
% second level design file, two-sample t-test
%
1 0 1
1 0 1 
1 0 1
1 0 1
1 0 1
1 0 1
1 0 1
0 1 1
0 1 1
0 1 1
0 1 1
0 1 1
0 1 1
0 1 1
This example design can be used to perform a two-sample t-test for comparing two groups of 7 subjects each (e.g. left handed vs. right handed). The contrast vector comparing the two groups should be '1 -1 0'. Caution: Make sure to use the correct order of input files when calling 'v2ndlevel'. Avoid wildcards!

Note: A two-sample t-test can also be performed using the program 'vtwosample_ttest' which does not require a second level design file.

Paired t-test
% 
% second level design file, paired t-test
%
1 0 1 0 0 0 0 0 0 0 1
0 1 1 0 0 0 0 0 0 0 1
1 0 0 1 0 0 0 0 0 0 1
0 1 0 1 0 0 0 0 0 0 1
1 0 0 0 1 0 0 0 0 0 1
0 1 0 0 1 0 0 0 0 0 1
1 0 0 0 0 1 0 0 0 0 1
0 1 0 0 0 1 0 0 0 0 1
1 0 0 0 0 0 1 0 0 0 1
0 1 0 0 0 0 1 0 0 0 1
1 0 0 0 0 0 0 1 0 0 1
0 1 0 0 0 0 0 1 0 0 1
1 0 0 0 0 0 0 0 1 0 1
0 1 0 0 0 0 0 0 1 0 1
1 0 0 0 0 0 0 0 0 1 1
0 1 0 0 0 0 0 0 0 1 1
This example design can be used to perform a paired t-test. It is used for 8 subjects which have been scanned twice (e.g. in the morning and in the afternoon). If you are interested in differences within the pairs (e.g. morning vs. afternoon), the contrast vector is '1 -1 0 0 0 0 0 0 0 0 0'. Caution: Make sure to use the correct order of input files when calling 'v2ndlevel'. Avoid wildcards!

Note: A paired t-test can also be performed using the program 'vpaired_ttest' which does not require a second level design file.



Max Planck Institute for Human Cognitive and Brain Sciences. Further Information: lipsia@cbs.mpg.de
Copyright © 2007 Max Planck Institute for Human Cognitive and Brain Sciences. All rights reserved.