help > 2x2 ANOVA setup
Showing 1-14 of 14 posts
Mar 12, 2014 08:03 PM | Greg Book
2x2 ANOVA setup
I have a 2 group, pre/post condition setup, and I'm trying to
determine what I should type in the 2nd level contrast boxes. What
matrix would I type for the following?
1) main effects of group
2) main effects of condition
3) interaction between group and condition
Thanks!
1) main effects of group
2) main effects of condition
3) interaction between group and condition
Thanks!
Mar 31, 2014 06:03 PM | Greg Book
RE: 2x2 ANOVA setup
I thought I would check again to see if anyone had an explanation
of the contrast setup?
Apr 14, 2014 09:04 PM | Alfonso Nieto-Castanon - Boston University
RE: 2x2 ANOVA setup
Hi Greg,
It depends on how you defined your second-level covariates, but assuming that you used two dummy-coded covariates, one for group1 subjects, and another for group2 subjects, you should then select both of these covariates in the 'between-subject effects' list, and also both of your conditions ('pre' and 'post') in your 'between-condition effects' list, and then enter the following contrast values:
1) main effect of group
Between-subject contrast: [-1 1]
Between-condition contrast: [.5 .5]
2) main effect of condition
Between-subject contrast: [.5 .5]
Between-condition contrast: [-1 1]
3) interaction between group and condition
Between-subject contrast: [-1 1]
Between-condition contrast: [-1 1]
Other additional contrasts of interest may be:
4) F-test for group effects across any of the two conditions
Between-subject contrast: [-1 1]
Between-condition contrast: [1 0; 0 1]
5) F-test for condition effects across any of the two subject groups
Between-subject contrast: [1 0; 0 1]
Between-condition contrast: [-1 1]
Hope this helps
Alfonso
Originally posted by Greg Book:
It depends on how you defined your second-level covariates, but assuming that you used two dummy-coded covariates, one for group1 subjects, and another for group2 subjects, you should then select both of these covariates in the 'between-subject effects' list, and also both of your conditions ('pre' and 'post') in your 'between-condition effects' list, and then enter the following contrast values:
1) main effect of group
Between-subject contrast: [-1 1]
Between-condition contrast: [.5 .5]
2) main effect of condition
Between-subject contrast: [.5 .5]
Between-condition contrast: [-1 1]
3) interaction between group and condition
Between-subject contrast: [-1 1]
Between-condition contrast: [-1 1]
Other additional contrasts of interest may be:
4) F-test for group effects across any of the two conditions
Between-subject contrast: [-1 1]
Between-condition contrast: [1 0; 0 1]
5) F-test for condition effects across any of the two subject groups
Between-subject contrast: [1 0; 0 1]
Between-condition contrast: [-1 1]
Hope this helps
Alfonso
Originally posted by Greg Book:
I have a 2 group, pre/post condition setup, and
I'm trying to determine what I should type in the 2nd level
contrast boxes. What matrix would I type for the following?
1) main effects of group
2) main effects of condition
3) interaction between group and condition
Thanks!
1) main effects of group
2) main effects of condition
3) interaction between group and condition
Thanks!
Oct 2, 2015 01:10 PM | Lars Michels
RE: 2x2 ANOVA setup
Dear Greg and Alfonso
I have a quite similar design (2 groups and for each of them I do have a pre and post (training) scan). I also want to test for main effects (F test).
During each scan I have resting and taks periods.
First, I am not sure how to set up the design matrix for this 2 x 2 ANOVA
Lets say, there are 4 controls and 4 patients. Do I have to choose 8 subjects or 16 in the Setup menu? For example, If have select 8, I could define two groups (2nd level covariates) and two conditions (pre and post). But then I cannot assign separte scans for each of them (Since I have only 1 session). Hence, I could still use 8 subjects in total but have to use 2 sessions for each subject and assign e.g. session 1 as the pre scan and session 2 as the post scan, right? However, the question is whether "pre" and "post" are still listed as Conditions in the 2nd level tab later on?
Alternatively, I could select 16 subjects, and code as controls_pre controls_post patients_pre patients_post (2nd level covariates) and as conditions still pre and post, e.g.
controls_pre [1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0], controls post [ 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0] etc.
I tested this. And yes, 4 groups and 2 conditions (pre/post) appear in the second level tab. But this is wrong, I think, as I do have only two groups (controls and patients) with repeated measures (pre and post).
Again, I wanted to run F-test first (and then t-tests).
Which of the Design scenarios is the correct one to choose?
Finally, I wanted to compute background connectivity (time bin: 0 inf) and task PPI connectivity. Does this mean I have to simply add some extra conditions, e.g. pre_background (0-inf) and pre_task (e.g. onset 20 40 60, duration 10) to be able to compute both background and PPI connectivity.
Thanks
Lars
I have a quite similar design (2 groups and for each of them I do have a pre and post (training) scan). I also want to test for main effects (F test).
During each scan I have resting and taks periods.
First, I am not sure how to set up the design matrix for this 2 x 2 ANOVA
Lets say, there are 4 controls and 4 patients. Do I have to choose 8 subjects or 16 in the Setup menu? For example, If have select 8, I could define two groups (2nd level covariates) and two conditions (pre and post). But then I cannot assign separte scans for each of them (Since I have only 1 session). Hence, I could still use 8 subjects in total but have to use 2 sessions for each subject and assign e.g. session 1 as the pre scan and session 2 as the post scan, right? However, the question is whether "pre" and "post" are still listed as Conditions in the 2nd level tab later on?
Alternatively, I could select 16 subjects, and code as controls_pre controls_post patients_pre patients_post (2nd level covariates) and as conditions still pre and post, e.g.
controls_pre [1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0], controls post [ 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0] etc.
I tested this. And yes, 4 groups and 2 conditions (pre/post) appear in the second level tab. But this is wrong, I think, as I do have only two groups (controls and patients) with repeated measures (pre and post).
Again, I wanted to run F-test first (and then t-tests).
Which of the Design scenarios is the correct one to choose?
Finally, I wanted to compute background connectivity (time bin: 0 inf) and task PPI connectivity. Does this mean I have to simply add some extra conditions, e.g. pre_background (0-inf) and pre_task (e.g. onset 20 40 60, duration 10) to be able to compute both background and PPI connectivity.
Thanks
Lars
Oct 5, 2015 04:10 PM | Alfonso Nieto-Castanon - Boston University
RE: 2x2 ANOVA setup
Dear Lars,
Yes, for this design you would typically enter 8 as the number of subjects and 2 as the number of sessions per subject. Then in Setup.Conditions you would define two conditions ('pre' and 'post') and assign each condition to the corresponding scan (e.g. to assign the 'pre' condition to the first session simply select 'pre' condition and 'session1' and enter 0/inf in onsets/durations, and then select 'pre' condition and 'session2' and enter []/[] in onsets/durations). Those two conditions pre/post will appear in your second-level results tab listed in the 'conditions' list, while your two subject groups patients/controls will appear listed in the 'subject effects' list.
If, in addition, you want to look at a PPI task vs. baseline analysis within each of your scans, then in addition to your 2 original conditions I would create another 2 conditions (e.g. pre_task, and post_task, with the corresponding task block onsets/durations instead of the original 0/inf values -and still []/[] for the opposite sessions). Then, in the first-level analysis tab simply select gPPI and select the two "task" conditions there (i.e. pre_task and post_task). The new analysis second-level results tab will contain only these two conditions (pre_task and post_task), each of them characterizing the PPI effect (differential connectivity between task and baseline) for each of the pre- and post- scans.
Hope this helps and let me know if you would like me to further clarify any of the above
Alfonso
Originally posted by Lars Michels:
Yes, for this design you would typically enter 8 as the number of subjects and 2 as the number of sessions per subject. Then in Setup.Conditions you would define two conditions ('pre' and 'post') and assign each condition to the corresponding scan (e.g. to assign the 'pre' condition to the first session simply select 'pre' condition and 'session1' and enter 0/inf in onsets/durations, and then select 'pre' condition and 'session2' and enter []/[] in onsets/durations). Those two conditions pre/post will appear in your second-level results tab listed in the 'conditions' list, while your two subject groups patients/controls will appear listed in the 'subject effects' list.
If, in addition, you want to look at a PPI task vs. baseline analysis within each of your scans, then in addition to your 2 original conditions I would create another 2 conditions (e.g. pre_task, and post_task, with the corresponding task block onsets/durations instead of the original 0/inf values -and still []/[] for the opposite sessions). Then, in the first-level analysis tab simply select gPPI and select the two "task" conditions there (i.e. pre_task and post_task). The new analysis second-level results tab will contain only these two conditions (pre_task and post_task), each of them characterizing the PPI effect (differential connectivity between task and baseline) for each of the pre- and post- scans.
Hope this helps and let me know if you would like me to further clarify any of the above
Alfonso
Originally posted by Lars Michels:
Dear Greg and Alfonso
I have a quite similar design (2 groups and for each of them I do have a pre and post (training) scan). I also want to test for main effects (F test).
During each scan I have resting and taks periods.
First, I am not sure how to set up the design matrix for this 2 x 2 ANOVA
Lets say, there are 4 controls and 4 patients. Do I have to choose 8 subjects or 16 in the Setup menu? For example, If have select 8, I could define two groups (2nd level covariates) and two conditions (pre and post). But then I cannot assign separte scans for each of them (Since I have only 1 session). Hence, I could still use 8 subjects in total but have to use 2 sessions for each subject and assign e.g. session 1 as the pre scan and session 2 as the post scan, right? However, the question is whether "pre" and "post" are still listed as Conditions in the 2nd level tab later on?
Alternatively, I could select 16 subjects, and code as controls_pre controls_post patients_pre patients_post (2nd level covariates) and as conditions still pre and post, e.g.
controls_pre [1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0], controls post [ 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0] etc.
I tested this. And yes, 4 groups and 2 conditions (pre/post) appear in the second level tab. But this is wrong, I think, as I do have only two groups (controls and patients) with repeated measures (pre and post).
Again, I wanted to run F-test first (and then t-tests).
Which of the Design scenarios is the correct one to choose?
Finally, I wanted to compute background connectivity (time bin: 0 inf) and task PPI connectivity. Does this mean I have to simply add some extra conditions, e.g. pre_background (0-inf) and pre_task (e.g. onset 20 40 60, duration 10) to be able to compute both background and PPI connectivity.
Thanks
Lars
I have a quite similar design (2 groups and for each of them I do have a pre and post (training) scan). I also want to test for main effects (F test).
During each scan I have resting and taks periods.
First, I am not sure how to set up the design matrix for this 2 x 2 ANOVA
Lets say, there are 4 controls and 4 patients. Do I have to choose 8 subjects or 16 in the Setup menu? For example, If have select 8, I could define two groups (2nd level covariates) and two conditions (pre and post). But then I cannot assign separte scans for each of them (Since I have only 1 session). Hence, I could still use 8 subjects in total but have to use 2 sessions for each subject and assign e.g. session 1 as the pre scan and session 2 as the post scan, right? However, the question is whether "pre" and "post" are still listed as Conditions in the 2nd level tab later on?
Alternatively, I could select 16 subjects, and code as controls_pre controls_post patients_pre patients_post (2nd level covariates) and as conditions still pre and post, e.g.
controls_pre [1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0], controls post [ 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0] etc.
I tested this. And yes, 4 groups and 2 conditions (pre/post) appear in the second level tab. But this is wrong, I think, as I do have only two groups (controls and patients) with repeated measures (pre and post).
Again, I wanted to run F-test first (and then t-tests).
Which of the Design scenarios is the correct one to choose?
Finally, I wanted to compute background connectivity (time bin: 0 inf) and task PPI connectivity. Does this mean I have to simply add some extra conditions, e.g. pre_background (0-inf) and pre_task (e.g. onset 20 40 60, duration 10) to be able to compute both background and PPI connectivity.
Thanks
Lars
Oct 6, 2015 08:10 AM | Lars Michels
RE: 2x2 ANOVA setup
Hi Alfonso
Great and thanks. Now, I think I know how to set up everything.
However, for PPI (is this gPPI by the way?), I do have also a control condition. This means I could add onsets/durations for them too (pre_control and post_control), right?
If I use the design matrix which you suggest, I can look to PPI task effect > "baseline" (which is the whole scan -> 0 – inf). This should give some strong results.
However, then I am not controlling PPI results for any confounding effect (that is why we had an fMRI control condition).
As I wrote, I am interested in both background and task connectivity
Assuming to your recent mail (see below), background connectivity can be achieved by moving task conditions to confounds. But then you wrote later on "in addition to the same 'rest' effects as you were obtaining before". I don't understand this because in one case task effects are regressed out (first analysis), whereas in the second analysis "task" is not a confound. How can this lead to the same background connectivity result for analysis 1 and 2?
What is your opinion on the Fair approach: Can we argue, it regresses out task effects but still reflects "general task engagement", since we model from 0-inf (which includes all task periods)?
In any case, I do have to run 2 CONN analysis, I assume, one to extract background connectivity (analysis 1) and one to extract task connectivity (analysis 2), right?
"Dear Pravesh,
analysis 1
Yes, the Fair et al. method is appropriate both for event-related and block-designs. Typically you simply define two or more conditions (e.g. in your case one 'rest' condition with 0/inf onsets durations, and then 'taskA' and 'taskB' conditions with your task block onsets/durations), and then select your 'taskA' and 'taskB' conditions and click on 'condition tools -> move selected conditions to first-level covariates list (Fair et al.)'. That will leave only 'rest' as your single condition but it will create a new 'taskA' and 'taskB' first-level covariates which will be used to remove the task effects during the Denoising step before computing connectivity measures (simply make sure that in the Denoising tab the 'effect of taskA' and 'effect of taskB' entries are listed as part of the 'confounds' list)
analysis 2
If, on the other hand, you are interested in potential condition-specific connectivity effects, then simply leave the original three conditions (rest, taskA, and taskB) in the Setup.conditions list (do not move the last two to the first-level covariates list), and still have all of those 'effect of task*' effects included in the 'confounds' list during Denoising. In this case, in addition to the same 'rest' effects as you were obtaining before, you will also obtain task-specific ('taskA' and 'taskB') connectivity estimates for your second-level analyses"
Best and thanks
Lars
Great and thanks. Now, I think I know how to set up everything.
However, for PPI (is this gPPI by the way?), I do have also a control condition. This means I could add onsets/durations for them too (pre_control and post_control), right?
If I use the design matrix which you suggest, I can look to PPI task effect > "baseline" (which is the whole scan -> 0 – inf). This should give some strong results.
However, then I am not controlling PPI results for any confounding effect (that is why we had an fMRI control condition).
As I wrote, I am interested in both background and task connectivity
Assuming to your recent mail (see below), background connectivity can be achieved by moving task conditions to confounds. But then you wrote later on "in addition to the same 'rest' effects as you were obtaining before". I don't understand this because in one case task effects are regressed out (first analysis), whereas in the second analysis "task" is not a confound. How can this lead to the same background connectivity result for analysis 1 and 2?
What is your opinion on the Fair approach: Can we argue, it regresses out task effects but still reflects "general task engagement", since we model from 0-inf (which includes all task periods)?
In any case, I do have to run 2 CONN analysis, I assume, one to extract background connectivity (analysis 1) and one to extract task connectivity (analysis 2), right?
"Dear Pravesh,
analysis 1
Yes, the Fair et al. method is appropriate both for event-related and block-designs. Typically you simply define two or more conditions (e.g. in your case one 'rest' condition with 0/inf onsets durations, and then 'taskA' and 'taskB' conditions with your task block onsets/durations), and then select your 'taskA' and 'taskB' conditions and click on 'condition tools -> move selected conditions to first-level covariates list (Fair et al.)'. That will leave only 'rest' as your single condition but it will create a new 'taskA' and 'taskB' first-level covariates which will be used to remove the task effects during the Denoising step before computing connectivity measures (simply make sure that in the Denoising tab the 'effect of taskA' and 'effect of taskB' entries are listed as part of the 'confounds' list)
analysis 2
If, on the other hand, you are interested in potential condition-specific connectivity effects, then simply leave the original three conditions (rest, taskA, and taskB) in the Setup.conditions list (do not move the last two to the first-level covariates list), and still have all of those 'effect of task*' effects included in the 'confounds' list during Denoising. In this case, in addition to the same 'rest' effects as you were obtaining before, you will also obtain task-specific ('taskA' and 'taskB') connectivity estimates for your second-level analyses"
Best and thanks
Lars
Oct 8, 2015 02:10 PM | Alfonso Nieto-Castanon - Boston University
RE: 2x2 ANOVA setup
Hi Lars,
Some thoughts on your questions below
Best
Alfonso
Originally posted by Lars Michels:
Yes, you can simply define the control condition explicitly in Setup.Conditions with its associated onsets/durations (I am assuming here that the control condition is not implicitly define; i.e. if you have a ABABAB design with A your task condition and B your control condition then, for PPI analyses, it is not strictly necessary to explicitly define the B condition onsets/durations)
And regarding the PPI vs. gPPI, gPPI refers to Donald's generalization of PPI when there is more than one condition of interest, which simply models all condition effects and interactions simultaneously in a single model instead of using a separate model for each condition tested (in general the gPPI model is always going to be preferable over PPI when there is more than one condition of interest, and it reduces to exactly the same as PPI when there is only one condition).
If I use the design matrix which you suggest, I can look to PPI task effect > "baseline" (which is the whole scan -> 0 – inf). This should give some strong results.
However, then I am not controlling PPI results for any confounding effect (that is why we had an fMRI control condition).
As I wrote, I am interested in both background and task connectivity
Assuming to your recent mail (see below), background connectivity can be achieved by moving task conditions to confounds. But then you wrote later on "in addition to the same 'rest' effects as you were obtaining before". I don't understand this because in one case task effects are regressed out (first analysis), whereas in the second analysis "task" is not a confound. How can this lead to the same background connectivity result for analysis 1 and 2?
The "effect of task*" effects are typically always entered in the denoising step, whether one wishes just look at the residual connectivity or one wishes to estimate task-related connectivity effects. This regression does not remove task-related connectivity differences, it only removes those connectivity differences that are directly due to a simple coactivation of two regions as a response to the task. See for example this post (http://www.nitrc.org/forum/message.php?m...) for a slightly more detailed explanation.
What is your opinion on the Fair approach: Can we argue, it regresses out task effects but still reflects "general task engagement", since we model from 0-inf (which includes all task periods)?
Yes, for the same reasons as in the response above this regression only removes some portion of the connectivity differences (those that are simply due to coactivation as a response to the task) so the residual signal still contains task effects. In the framework of PPI, this regression removes the "main psycological" effect but it does not remove the "psychological by physiological interaction" terms (which are the ones we would typically be interested in when looking at task-related connectivity effects).
In any case, I do have to run 2 CONN analysis, I assume, one to extract background connectivity (analysis 1) and one to extract task connectivity (analysis 2), right?
I would typically have both in the same conn project, and just run those as separate first-level analyses. For example, I would create three conditions "rest", "task", and "control". Then for analysis1 I would just use weighted-GLM (and look at the "rest" or "control" conditions), and for analysis2 I would just use gPPI (and select there the "task" and "control" conditions only; I am again assuming here that you do not have an ABABAB design -see this post http://www.nitrc.org/forum/message.php?m... for some discussion of why that makes a difference).
Hope this helps
Alfonso
Some thoughts on your questions below
Best
Alfonso
Originally posted by Lars Michels:
Hi Alfonso
Great and thanks. Now, I think I know how to set up everything.
However, for PPI (is this gPPI by the way?), I do have also a control condition. This means I could add onsets/durations for them too (pre_control and post_control), right?
Great and thanks. Now, I think I know how to set up everything.
However, for PPI (is this gPPI by the way?), I do have also a control condition. This means I could add onsets/durations for them too (pre_control and post_control), right?
Yes, you can simply define the control condition explicitly in Setup.Conditions with its associated onsets/durations (I am assuming here that the control condition is not implicitly define; i.e. if you have a ABABAB design with A your task condition and B your control condition then, for PPI analyses, it is not strictly necessary to explicitly define the B condition onsets/durations)
And regarding the PPI vs. gPPI, gPPI refers to Donald's generalization of PPI when there is more than one condition of interest, which simply models all condition effects and interactions simultaneously in a single model instead of using a separate model for each condition tested (in general the gPPI model is always going to be preferable over PPI when there is more than one condition of interest, and it reduces to exactly the same as PPI when there is only one condition).
If I use the design matrix which you suggest, I can look to PPI task effect > "baseline" (which is the whole scan -> 0 – inf). This should give some strong results.
However, then I am not controlling PPI results for any confounding effect (that is why we had an fMRI control condition).
As I wrote, I am interested in both background and task connectivity
Assuming to your recent mail (see below), background connectivity can be achieved by moving task conditions to confounds. But then you wrote later on "in addition to the same 'rest' effects as you were obtaining before". I don't understand this because in one case task effects are regressed out (first analysis), whereas in the second analysis "task" is not a confound. How can this lead to the same background connectivity result for analysis 1 and 2?
The "effect of task*" effects are typically always entered in the denoising step, whether one wishes just look at the residual connectivity or one wishes to estimate task-related connectivity effects. This regression does not remove task-related connectivity differences, it only removes those connectivity differences that are directly due to a simple coactivation of two regions as a response to the task. See for example this post (http://www.nitrc.org/forum/message.php?m...) for a slightly more detailed explanation.
What is your opinion on the Fair approach: Can we argue, it regresses out task effects but still reflects "general task engagement", since we model from 0-inf (which includes all task periods)?
Yes, for the same reasons as in the response above this regression only removes some portion of the connectivity differences (those that are simply due to coactivation as a response to the task) so the residual signal still contains task effects. In the framework of PPI, this regression removes the "main psycological" effect but it does not remove the "psychological by physiological interaction" terms (which are the ones we would typically be interested in when looking at task-related connectivity effects).
In any case, I do have to run 2 CONN analysis, I assume, one to extract background connectivity (analysis 1) and one to extract task connectivity (analysis 2), right?
I would typically have both in the same conn project, and just run those as separate first-level analyses. For example, I would create three conditions "rest", "task", and "control". Then for analysis1 I would just use weighted-GLM (and look at the "rest" or "control" conditions), and for analysis2 I would just use gPPI (and select there the "task" and "control" conditions only; I am again assuming here that you do not have an ABABAB design -see this post http://www.nitrc.org/forum/message.php?m... for some discussion of why that makes a difference).
Hope this helps
Alfonso
Oct 8, 2015 04:10 PM | Lars Michels
RE: 2x2 ANOVA setup
Hi Alfonso
Thanks for your quick reply.
It makes perfectly sense.
@gPPI: No, I don't have an ABABAB design but rather A rest B rest A rest. I was just wondering if I would not define the "control" condition for the task then gPPI would probably give the the same result as the "classical" PPI analysis, right? Can we speak also from a gPPI if I have only one task condition (and no control) twice, before AND after training?
One (last) question to the design. Now, I first calculated the background connectivity (and moved the task conditions as Covariates using the condition tool. In addition, I moved in the Denoising tab the 'effect of task' as part of the 'confounds' list)
Using the same con.mat file, I then wanted to run the gPPI. Can you confirm, is this procedure correct?
"For the condition-specific connectivity effects, then simply leave the original three conditions (rest, task, and control for task) in the Setup.conditions list (do not move the last two to the first-level covariates list), and still have all of those 'effect of task*' effects included in the 'confounds' list during Denoising. In this case, in addition to the same 'rest' effects as you were obtaining before, you will also obtain task-specific ('task' and 'control for task') connectivity estimates for your second-level analyses"
Funnily, I cannot run the gPPI using the same design mat file, since I cannot restore the task condition once I moved it to the Covariates list in the condition list (at least it did to reappear under conditions when I delete this covariate).
Thanks
Lars
Thanks for your quick reply.
It makes perfectly sense.
@gPPI: No, I don't have an ABABAB design but rather A rest B rest A rest. I was just wondering if I would not define the "control" condition for the task then gPPI would probably give the the same result as the "classical" PPI analysis, right? Can we speak also from a gPPI if I have only one task condition (and no control) twice, before AND after training?
One (last) question to the design. Now, I first calculated the background connectivity (and moved the task conditions as Covariates using the condition tool. In addition, I moved in the Denoising tab the 'effect of task' as part of the 'confounds' list)
Using the same con.mat file, I then wanted to run the gPPI. Can you confirm, is this procedure correct?
"For the condition-specific connectivity effects, then simply leave the original three conditions (rest, task, and control for task) in the Setup.conditions list (do not move the last two to the first-level covariates list), and still have all of those 'effect of task*' effects included in the 'confounds' list during Denoising. In this case, in addition to the same 'rest' effects as you were obtaining before, you will also obtain task-specific ('task' and 'control for task') connectivity estimates for your second-level analyses"
Funnily, I cannot run the gPPI using the same design mat file, since I cannot restore the task condition once I moved it to the Covariates list in the condition list (at least it did to reappear under conditions when I delete this covariate).
Thanks
Lars
Oct 9, 2015 02:10 PM | Alfonso Nieto-Castanon - Boston University
RE: 2x2 ANOVA setup
Hi Lars,
Some thoughts on your questions below
Best
Alfonso
Originally posted by Lars Michels:
Yes, if you only define the "task" condition (just for consistency I am going to call your three types of blocks here "task", "control", and "baseline") then the PPI analyses (or gPPI when you only select the "task" condition) is going to give you the relative connectivity between the "task" blocks and the aggregated "control" and "baseline" blocks. For your design I would probably suggest to define at least the "task" and "control" conditions explicitly (in Setup.Conditions), and then select gPPI analyses and select both of these conditions. When you do this, if in the second-level results you only select: a) only the "task" condition, that will give you the relative connectivity between the "task" blocks and the "baseline" blocks; b) only the "control" condition, that will give you the relative connectivity between the "control" blocks and the "baseline" blocks; and c) both the "task" and "control" conditions (1 -1 contrast), that will you give you the relative connectivity between the "task" and "control" blocks.
Also, if in addition you have pre- and post- scanning sessions, then you could simply create four conditions "task_pre", "control_pre", "task_post" and "control_post", and again select all four when performing gPPI analyses.
Last, in case I have not mentioned this before, if you have relatively long blocks then both gPPI and weighted-GLM analyses (within-block connectivity estimates) are going to give you almost identical results, so if you find it simpler you could also simply define explicitly all of your conditions (e.g. "task_pre", "control_pre", "baseline_pre", "task_post", "control_post", and "baseline_post") and perform standard weighted-GLM analyses, which will allow you to look at the individual connectivity effects or at any arbitrary between-conditions contrast in your second-level results.
One (last) question to the design. Now, I first calculated the background connectivity (and moved the task conditions as Covariates using the condition tool. In addition, I moved in the Denoising tab the 'effect of task' as part of the 'confounds' list)
Using the same con.mat file, I then wanted to run the gPPI. Can you confirm, is this procedure correct?
"For the condition-specific connectivity effects, then simply leave the original three conditions (rest, task, and control for task) in the Setup.conditions list (do not move the last two to the first-level covariates list), and still have all of those 'effect of task*' effects included in the 'confounds' list during Denoising. In this case, in addition to the same 'rest' effects as you were obtaining before, you will also obtain task-specific ('task' and 'control for task') connectivity estimates for your second-level analyses"
Funnily, I cannot run the gPPI using the same design mat file, since I cannot restore the task condition once I moved it to the Covariates list in the condition list (at least it did to reappear under conditions when I delete this covariate).
Yes, sorry about that, you cannot "move back" a first-level covariate into the conditions list (you need to re-enter the condition onset/duration vectors; sorry there is no simple fix, when moving a condition to the first-level covariate list only the associated regressor timeseries are kept so it is not possible to reconstruct the original onset/duration values from that timeseries)
And yes, just to be explicit, for your pre- and post- design, I would suggest to duplicate your conditions (i.e. "rest_pre", "task_pre", "control_pre", "rest_post", "task_post", and "control_post"). Then:
a) for psychophysiological interaction analyses you can run gPPI selecting the four "task_pre" "control_pre" "task_post" and "control_post" conditions (the not-explicitly-defined baseline blocks will act as baseline for the individual PPI effects in these analyses)
b) for Fair et al. style analyses you can run weighted-GLM selecting only the "rest_pre" and "rest_post" conditions.
c) for within-block connectivity estimates you can run weighted-GLM selecting the four "task_pre" "control_pre" "task_post" and "control_post" conditions
In all cases you would leave all of the four "effect of *" effects in the Denoising step 'confounding-effects' list.
Hope this helps
Alfonso
Some thoughts on your questions below
Best
Alfonso
Originally posted by Lars Michels:
Hi Alfonso
Thanks for your quick reply.
It makes perfectly sense.
@gPPI: No, I don't have an ABABAB design but rather A rest B rest A rest. I was just wondering if I would not define the "control" condition for the task then gPPI would probably give the the same result as the "classical" PPI analysis, right? Can we speak also from a gPPI if I have only one task condition (and no control) twice, before AND after training?
Thanks for your quick reply.
It makes perfectly sense.
@gPPI: No, I don't have an ABABAB design but rather A rest B rest A rest. I was just wondering if I would not define the "control" condition for the task then gPPI would probably give the the same result as the "classical" PPI analysis, right? Can we speak also from a gPPI if I have only one task condition (and no control) twice, before AND after training?
Yes, if you only define the "task" condition (just for consistency I am going to call your three types of blocks here "task", "control", and "baseline") then the PPI analyses (or gPPI when you only select the "task" condition) is going to give you the relative connectivity between the "task" blocks and the aggregated "control" and "baseline" blocks. For your design I would probably suggest to define at least the "task" and "control" conditions explicitly (in Setup.Conditions), and then select gPPI analyses and select both of these conditions. When you do this, if in the second-level results you only select: a) only the "task" condition, that will give you the relative connectivity between the "task" blocks and the "baseline" blocks; b) only the "control" condition, that will give you the relative connectivity between the "control" blocks and the "baseline" blocks; and c) both the "task" and "control" conditions (1 -1 contrast), that will you give you the relative connectivity between the "task" and "control" blocks.
Also, if in addition you have pre- and post- scanning sessions, then you could simply create four conditions "task_pre", "control_pre", "task_post" and "control_post", and again select all four when performing gPPI analyses.
Last, in case I have not mentioned this before, if you have relatively long blocks then both gPPI and weighted-GLM analyses (within-block connectivity estimates) are going to give you almost identical results, so if you find it simpler you could also simply define explicitly all of your conditions (e.g. "task_pre", "control_pre", "baseline_pre", "task_post", "control_post", and "baseline_post") and perform standard weighted-GLM analyses, which will allow you to look at the individual connectivity effects or at any arbitrary between-conditions contrast in your second-level results.
One (last) question to the design. Now, I first calculated the background connectivity (and moved the task conditions as Covariates using the condition tool. In addition, I moved in the Denoising tab the 'effect of task' as part of the 'confounds' list)
Using the same con.mat file, I then wanted to run the gPPI. Can you confirm, is this procedure correct?
"For the condition-specific connectivity effects, then simply leave the original three conditions (rest, task, and control for task) in the Setup.conditions list (do not move the last two to the first-level covariates list), and still have all of those 'effect of task*' effects included in the 'confounds' list during Denoising. In this case, in addition to the same 'rest' effects as you were obtaining before, you will also obtain task-specific ('task' and 'control for task') connectivity estimates for your second-level analyses"
Funnily, I cannot run the gPPI using the same design mat file, since I cannot restore the task condition once I moved it to the Covariates list in the condition list (at least it did to reappear under conditions when I delete this covariate).
Yes, sorry about that, you cannot "move back" a first-level covariate into the conditions list (you need to re-enter the condition onset/duration vectors; sorry there is no simple fix, when moving a condition to the first-level covariate list only the associated regressor timeseries are kept so it is not possible to reconstruct the original onset/duration values from that timeseries)
And yes, just to be explicit, for your pre- and post- design, I would suggest to duplicate your conditions (i.e. "rest_pre", "task_pre", "control_pre", "rest_post", "task_post", and "control_post"). Then:
a) for psychophysiological interaction analyses you can run gPPI selecting the four "task_pre" "control_pre" "task_post" and "control_post" conditions (the not-explicitly-defined baseline blocks will act as baseline for the individual PPI effects in these analyses)
b) for Fair et al. style analyses you can run weighted-GLM selecting only the "rest_pre" and "rest_post" conditions.
c) for within-block connectivity estimates you can run weighted-GLM selecting the four "task_pre" "control_pre" "task_post" and "control_post" conditions
In all cases you would leave all of the four "effect of *" effects in the Denoising step 'confounding-effects' list.
Hope this helps
Alfonso
May 2, 2016 12:05 PM | Bruno Baumann
RE: 2x2 ANOVA setup
Dear Alfredo,
after reading several posts I'm still a bit puzzled how to report the results of a mixed-design ANOVA.
I set up a 2x2x2 model (group, condition, roi). The 3-way interaction gives me a T-value instead of F-values which would be expected for a rmANOVA for example.
group: [1 -1]
condition: [1 -1]
roi: [1 -1]
If I understand correctly this is founded in the way results are calculated (t-tests for within-subject-effects on 1st-level, subsequent results in t-tests on 2nd level (between-subjects-effects))
If I want to report F-values is it the correct way to calculate the F=t^2 as indicated in that post (https://www.nitrc.org/forum/message.php?...)?
I hope the specifications are sufficient.
Thanks in advance and best wishes,
Bruno
after reading several posts I'm still a bit puzzled how to report the results of a mixed-design ANOVA.
I set up a 2x2x2 model (group, condition, roi). The 3-way interaction gives me a T-value instead of F-values which would be expected for a rmANOVA for example.
group: [1 -1]
condition: [1 -1]
roi: [1 -1]
If I understand correctly this is founded in the way results are calculated (t-tests for within-subject-effects on 1st-level, subsequent results in t-tests on 2nd level (between-subjects-effects))
If I want to report F-values is it the correct way to calculate the F=t^2 as indicated in that post (https://www.nitrc.org/forum/message.php?...)?
I hope the specifications are sufficient.
Thanks in advance and best wishes,
Bruno
Mar 27, 2020 01:03 AM | Amy Bouchard
RE: 2x2 ANOVA setup
Hello Alfonso,
Could you please tell me how would one obtain F values for the contrasts 1) main effect of group, 2) main effect of condition, 3) interaction between group and condition?
I have the same design (2 x 2 ANOVA), however, in the 2nd level results, it shows a t-statistic instead of an F-statistic.
Thanks,
Amy
Could you please tell me how would one obtain F values for the contrasts 1) main effect of group, 2) main effect of condition, 3) interaction between group and condition?
I have the same design (2 x 2 ANOVA), however, in the 2nd level results, it shows a t-statistic instead of an F-statistic.
Thanks,
Amy
Mar 28, 2020 01:03 PM | Alfonso Nieto-Castanon - Boston University
RE: 2x2 ANOVA setup
Hi Amy,
CONN will use T-stats for ANOVAs with two levels for each factor and F-stats for ANOVAs with three or more levels (for details about GLM stats see https://web.conn-toolbox.org/fmri-method...). In reality that is somewhat arbitrary since two-sided T-stats and F- stats are exactly equivalent (and the only reason to use T- instead of F- values in this case is just to also allow directional tests). If you want to transform T-stats to F-stats simply use the equivalence:
T(df) ^2 = F(1,df)
So, for example, if CONN reports in voxel-based analyses |T(15)|>3, you may simply report instead F(1,15)>9; or if in an ROI-to-ROI analysis you are obtaining "T(15) = 2, p = 0.0639 (two-tailed)", you may equivalently report that as "F(1,15) = 4, p =0.0639"
Best
Alfonso
ps. you may check this equivalence with the syntax:
T=randn; % T-stat value
df=randi([1 10]); % degrees of freedom
p1=1-spm_Tcdf(T,df); % one-sided p-value (T-stat)
p1=2*min(p1,1-p1); % two-sided p-value (T-stat)
p2=1-spm_Fcdf(T^2,1,df); % p-value (F-stat)
disp([p1 p2])
Originally posted by Amy Bouchard:
CONN will use T-stats for ANOVAs with two levels for each factor and F-stats for ANOVAs with three or more levels (for details about GLM stats see https://web.conn-toolbox.org/fmri-method...). In reality that is somewhat arbitrary since two-sided T-stats and F- stats are exactly equivalent (and the only reason to use T- instead of F- values in this case is just to also allow directional tests). If you want to transform T-stats to F-stats simply use the equivalence:
T(df) ^2 = F(1,df)
So, for example, if CONN reports in voxel-based analyses |T(15)|>3, you may simply report instead F(1,15)>9; or if in an ROI-to-ROI analysis you are obtaining "T(15) = 2, p = 0.0639 (two-tailed)", you may equivalently report that as "F(1,15) = 4, p =0.0639"
Best
Alfonso
ps. you may check this equivalence with the syntax:
T=randn; % T-stat value
df=randi([1 10]); % degrees of freedom
p1=1-spm_Tcdf(T,df); % one-sided p-value (T-stat)
p1=2*min(p1,1-p1); % two-sided p-value (T-stat)
p2=1-spm_Fcdf(T^2,1,df); % p-value (F-stat)
disp([p1 p2])
Originally posted by Amy Bouchard:
Hello Alfonso,
Could you please tell me how would one obtain F values for the contrasts 1) main effect of group, 2) main effect of condition, 3) interaction between group and condition?
I have the same design (2 x 2 ANOVA), however, in the 2nd level results, it shows a t-statistic instead of an F-statistic.
Thanks,
Amy
Could you please tell me how would one obtain F values for the contrasts 1) main effect of group, 2) main effect of condition, 3) interaction between group and condition?
I have the same design (2 x 2 ANOVA), however, in the 2nd level results, it shows a t-statistic instead of an F-statistic.
Thanks,
Amy
Mar 28, 2020 07:03 PM | Amy Bouchard
RE: 2x2 ANOVA setup
Hi Alfonso,
perfect, thank you so much!
Take care.
Best,
Amy
perfect, thank you so much!
Take care.
Best,
Amy
Feb 1, 2023 02:02 PM | Victor Pando-Naude
RE: 2x2 ANOVA setup
Hi Alfonso,
Thanks for all your amazing contributions. Looking at the answer you gave below, how would I test the same effects and interactions if I have 4 conditions, instead of just 2. For example, for the main effect of group, I would write [1 -1] in first column, in second column I don't know if instead of [.5 .5] I should write [.25 .25 .25 .25]? I would also like to test the effect of condition, and condition by group interaction.
Thanks again
Thanks for all your amazing contributions. Looking at the answer you gave below, how would I test the same effects and interactions if I have 4 conditions, instead of just 2. For example, for the main effect of group, I would write [1 -1] in first column, in second column I don't know if instead of [.5 .5] I should write [.25 .25 .25 .25]? I would also like to test the effect of condition, and condition by group interaction.
Thanks again