Print

Print


Dear William,

Once again, thank you for the very accurate and clear answer.
Last question: I also have a baseline condition in my experiment (a fixation cross). I put it in the first level model as a regressor. For the contrasts you told me, where does the baseline condition come in? Is it necessary to contrast the questions with the baseline or the inclusion of the fixation cross as a condition already “models out” the baseline in the model as a nuisance factor and therefore I need not contrast my conditions versus it?
Thank you very much, 


Leonardo Tozzi

Research Fellow
Discipline of Psychiatry
Trinity College Institute of Neuroscience
College Green
Dublin 2
Ireland

Office: +35318964234
Mobile: +353851026166

On 30 Oct 2015, at 09:47, Penny, William <[log in to unmask]> wrote:


Dear Leornardo,

Re question (1). Yes, absolutely correct. You specify t-contrasts at the first level. SPM will then create a con image for each t-contrast you specify. SPM does not create contrast images for F-contrasts (it creates extra sum of squares images - great for 1st level analysis but it doesn't help with group level inference). But we can get round this by creating a t-contrast for each row of the F-contrast we are interested in - if there are two rows there are two contrasts (per subject).

Re question (2). Yes, your thinking is correct here. There is no need to specify the third contrast because it is in the same (linear, ie. weighting and adding) subspace that is spanned by the other two. This means you can create it by a linear combination of the other two (in this case simply the first one plus the second one).  In effect the F-contrast at the second level is asking the question: Is there any difference between positive and neutral stimuli (contrast one), or neutral and negative stimuli (contrast two) or any linear combination thereof ? 

Re question (3). I think you're quite right here. The two-by-two offers a finessed way of dealing with (co)variability among conditions, and will give improved results over the simple 1-way ANOVA with four levels I described. But I wouldn't expect a big difference.

Best, W

--------------------
 
Dear William,

Thank you very much for the rapid and very detailed response.
I only have a few clarifications left:

1) From what I understand, the contrasts you use at the first level are T contrasts, right? You then run the Fs (and maybe post-hoc Ts) at the second level.
2) In (5) you say: “for the main effect of Factor B I would use two contrasts per subject [1 -1 0 1 -1 0] and [0 1 -1 0 1 -1] “. However, B has 3 levels, so should I add in [1 0 -1 1 0 -1] as well? This way, I would have 3 con images per subject. I saw that running Con = spm_make_contrasts ([2 3]) does indeed return only 2 contrasts for “main effect of factor 2”, as you say. Is this because the  [1 0 -1 1 0 -1] becomes already included if one includes both [1 -1 0 1 -1 0] and [0 1 -1 0 1 -1]? 
3) For the issue of independence: I was thinking of setting the independence in the between groups analysis to “Yes” and the one where more contrasts are involved to “No”. However, if I ran an ANOVA for (5), as you suggest, I can only enter the independence once. Wouldn’t a full factorial model be more appropriate, so that I can enter “independence: Yes” for the group factor and “No” for the valence factor? 

Thank you very much once again.
Yours sincerely,


Leonardo Tozzi

Research Fellow
Discipline of Psychiatry
Trinity College Institute of Neuroscience
College Green
Dublin 2
Ireland

Office: +35318964234
Mobile: +353851026166

On 30 Oct 2015, at 08:11, Penny, William <[log in to unmask]> wrote:

Leonardo,

Sorry - i've counted that wrong. Its four sets of first-level con images, but two design matrices for each. Overall, 8 second level design matrices - one for each effect you are testing.

All the best,

W.



From: Penny, William
Sent: 30 October 2015 08:05
To: [log in to unmask]; Leonardo Tozzi
Subject: Re: Use of multiple contrasts in a second level factorial design
 

Dear Leonardo,

I would analyse this data as described below. Classically, there are 8 effects you might wish to test for (see below) - in what i've described you set up 4 different 2nd-level designs and enter two 2nd level contrasts for each.  That is, you create 4 new directories for SPM analyses, and each uses a different set of first-level contrast images as data. So, step (1) is to create the necessary first level con images, step (2) create the 4 second level design matrices, assign con images and fit the models, step (3) is to enter the 2nd level contrasts to test for the effects you are interested in.

I'm assuming you have two within-subject factors here (A) Task, with two levels: question 1 or question 2 and (B) Emotional valence, with three levels: (1) positive, (2) neutral and (3) negative. 

To make this concrete lets say you have 18 people in the patient group and 17 in the controls, making a total of 35.
Let's also say you have set up a first level design matrix for each subject with columns arranged in the order A1B1, A1B2, A1B3, A2B1, A2B2 and A2,B3.

To test (1) the overall effect I would use a [1 1 1 1 1 1] contrast for each subject and take the resulting 35 con images into a one-sample t-test at the second level. Then you would specify a '1' F-contrast (at the second level) to test for significantly non-zero BOLD responses related to your paradigm. Using the same first level contrast images in a two-sample t-test design at the second level, split into the 18 patients and 17 controls, will let you test for group effects (using a second-level F-contrast [1 -1] to test for differences). This is (2) the main effect of group.

To test for (3) the main effect of Factor A (the one with two levels) I would use a [1 1 1 -1 -1 -1] contrast for each subject and take the resulting 35 con images into a one-sample t-test at the second level. Similarly, using the same first level contrast images in a two-sample t-test design at the second level, split into the 18 patients and 17 controls, will let you test for group effects (using a second-level F-contrast [1 -1] to test for differences). This will test for (4) the group x task interaction. 

To test for (5) the main effect of Factor B I would use two contrasts per subject [1 -1 0 1 -1 0] and [0 1 -1 0 1 -1] and take the resulting 70 con images (two per subject) into a two-sample t-test design at the second level. I would then use a [1 0; 0 1] F-contrast to test for this main effect. Similarly, using the same first level contrast images in a one-way ANOVA design at the second level (with 4 "levels"; first two for patients, second two for controls), split into the 18 patients and 17 controls, will let you test for group effects (using a second-level F-contrast [1 0 -1 0; 0 1 0 -1] to test for differences). This will test for (6) the group x valence interaction. 

To test for (7) the interaction between Factors A and B I would use two contrasts per subject [1 -1 0 -1 1 0] and [0 1 -1 0 -1 1] and take the resulting 70 con images (two per subject) into a two-sample t-test design at the second level. I would then use a [1 0; 0 1] F-contrast to test for this interaction effect. Similarly, using the same contrasts in a one-way ANOVA design at the second level (with 4 "levels"; first two for patients, second two for controls), split into the 18 patients and 17 controls, will let you test for group effects (using a second-level F-contrast [1 0 -1 0; 0 1 0 -1] to test for differences). This will test for (8) the group x valence x task interaction. 

That's it in terms of the factorial nature of your design: for a factorial design with 3 factors there are 8 effects to test for: an overall effect, 3 main effects, 3 two-way interactions and one 3-way interaction - and you can test for them using the approaches numbered (1) to (8) above. 

As an aside, SPM can help you with the contrast you need to test for effects in factorial designs. Use the function 
> Con = spm_make_contrasts ([k1 k2]) for a k1 by k2 design (eg. 2 by 3) . If the required contrast has multiple rows you'll need to take up multiple con images to the second level.

For any of the second level designs you can also enter covariates, such as age. If you have a one-sample t-test design at the second level then this is straightforward, as long as your age variable is centred - i.e. zero mean (otherwise it will be collinear with the other effect you are testing, and make it disappear). A [0 1] F-contrast will then test for regions with BOLD responses dependent on age. For more complex second level designs e.g. two-sample t-tests, you can include an interaction term - this will create two new columns e.g. age of patients, age of controls. A [0 0 1 0; 0 0 0 1] F-contrast then tests for any effect of age, a [0 0 1 -1] F-contrast then tests for regions where the BOLD vs age effect is different for patients versus controls.

All the best,

Will.




From: SPM (Statistical Parametric Mapping) <[log in to unmask]> on behalf of Leonardo Tozzi <[log in to unmask]>
Sent: 29 October 2015 12:17
To: [log in to unmask]
Subject: [SPM] Use of multiple contrasts in a second level factorial design
 
To Whom it may concern,

From what I have seen in the mailing list, I may not be the first to ask this question, but I am a bit confused by the answers I saw, since I am not sure how they relate to my specific case.

I have a task design that involves emotional pictures (positive, neutral and negative) each followed by one of two possible questions (1 and 2). At the first level, I computed six contrasts per subject, with each question type separately for each emotional valence, versus baseline.
I now would like to assess the role of the valence and question type factors as well as a group factor (patient versus control) at the second level.
From what I understood, the easiest option would be a full factorial model with 3 factors: group, question type and valence. My questions are:

1) Can I use a full-factorial model or the use of multiple contrast from each of the subjects is equivalent to a repeated measures design, which would mean I have to use a flexible factorial design and model a “Subject” factor explicitly? 

2) If I use a full factorial, from what I gather the independence of the factors should be: group(Yes), question(No), valence(No). What about the variance? Should it be unequal, equal, equal or just always unequal? 

3) Another, perhaps easier, possibility would be to just use two groups t-tests and assess each of the 6 conditions. So I would have to run 6 ttests. However if I wanted to, for example, assess the difference across groups in question 1 regardless of valence, can I simply enter all the contrasts of question one (that is for positive, neutral and negative valence) in the “Group 1 scans” box? I assume this would compute the average of all the scans and compare it across groups, which is what I would be looking for, but is there any problem in entering 3 scans per subject in the ttest design? Also, suppose I enter age as a covariate. I then would need to enter the same age 3 times per subject. Would that be a problem?

Sorry if this question has maybe already been answered, I am just still a bit confused.
Thank you very much for your help.
Yours faithfully, 






Leonardo Tozzi

Research Fellow
Discipline of Psychiatry
Trinity College Institute of Neuroscience
College Green
Dublin 2
Ireland

Office: +35318964234
Mobile: +353851026166