Print

Print


Dear Brie,

You would have to set up six T contrasts on single-subject level, reflecting the six combinations stimulus x time, which should look like [1 0 ...], [0 1 ...], with ... indicating zero-padding. 

Assuming the seven subjects make up a single group of subjects then go with a Flexible factorial model with factors "stimulus", "time" (variance equal, independence no) and "subject" (variance equal, independence yes). For "Specify Subjects ...", you can go with "Subjects", create seven subjects, for "Scans" provide the six contrast images, for "Conditions" specify the corresponding levels (e.g. [1 1; 1 2; 1 3; 2 1; 2 2; 2 3] in case the first contrast image corresponds to S1T1, the second to S1T2, ...). For "Main effects & Interactions" create one interaction with factor numbers [1 2] (indicating factor 1 stimulus and factor 2 time, the term is misleading, it allows to test for the interaction and the two "associated" main effects) and one main effect with factor number 3 (reflecting the different subjects). The design matrix should then look like this:

S1T1 S1T2 S1T3 S2T1 S2T2 S2T3 Sub1 ... Sub7
 
Contrast vectors should be:
> Main effect stimulus
[1/3 1/3 1/3 -1/3 -1/3 -1/3 0 ... 0]

> Main effect time
[1/2 -1/2 0 1/2 -1/2 0 0 ... 0;
 0 1/2 -1/2 0 1/2 -1/2 0 ... 0]

> Interaction stimulus x time 
[1 -1 0 -1 1 0 0 ... 0;
 0 1 -1 0 -1 1 0 ... 0]

The latter two have to be F contrasts, for consistency reasons the first one should be an F contrast as well (you could go with T contrasts [1/3 1/3 1/3 -1/3 -1/3 -1/3 0 ... 0] and [-1/3 -1/3 -1/3 1/3 1/3 1/3 0 ... 0] reflecting S1 > S2 and S2 > S1, but note that SPM performs one-directed t-tests, so if you go with .001 uncorrected for the F contrasts you should look at the two T constrasts with .001/2 = .0005, otherwise you use a more liberal threshold for one of the main effects).

The flexible factorial is based on pooled error terms, if you want to go with partioned error terms (usual settings when e.g. running behavioral analyses with SPSS), then go with GLM flex (could be done with SPM as well, but would be a little confusing probably). Here's http://mrtools.mgh.harvard.edu/index.php/2x2_Factor_Within an example for a 2x2 ANOVA with GLM flex, this would have to be adapted accordingly, something like this (please double-check yourself):

IN.N_subs = [7];
IN.Within = [2 3];
IN.WithinLabs = {{'S1' 'S2'} {'T1' 'T2' 'T3'}};
IN.Interactions = {[1 2]};
IN.FactorLabs = {'Stimulus' 'Time'};

F = CreateDesign2(IN); 

figure(20); clf
imagesc(F.XX); colormap(gray); shg

I.OutputDir = pwd; % Directory for analysis
I.F = F;
I.DoOnlyAll = 1;
I.Scans = {
... % Provide the contrast images, go with Sub1S1T1, Sub1S1T2, Sub1S1T3, Sub1S2T1, ... Sub2S1T1, ...
};

I.Cons(1).Groups = {1 2};
I.Cons(1).Levs = [2];
I.Cons(1).ET = 2;
I.Cons(1).mean = 0;

I.Cons(2).Groups = {3 4 5};
I.Cons(2).Levs = [3];
I.Cons(2).ET = 3;
I.Cons(2).mean = 0; 

I.Cons(3).Groups = {6 7 8 9 10 11};
I.Cons(3).Levs = [2 3];
I.Cons(3).ET = 4;
I.Cons(3).mean = 0;

I = GLM_Flex2(I);

You can look at the results (T, F images) with e.g. xjview, which also allows to threshold them at e.g. .001 uncorrected. Due to the two levels main effect stimulus will result in a T image, to reflect a .001 uncorrected you would have to look at "positive"/"negative" directions with .0005 each. The authors of GLM flex also provide some tools for display purpose (FIVE) and thresholding (peak_nii), see http://mrtools.mgh.harvard.edu/index.php/Downloads and https://www.nitrc.org/projects/peak_nii/

Best

Helmut