help > Design matrix & contrast for 2 x 2 (group) factorial ANOVA in NBS
Showing 1-5 of 5 posts
Display:
Results per page:
Apr 17, 2018  02:04 PM | Lizzie Shephard - King's College London
Design matrix & contrast for 2 x 2 (group) factorial ANOVA in NBS
Dear all

I was hoping someone could check that the design matrix and contrasts I am specifying for NBS are correct.

I have a sample of 19 control participants, 15 participants with ADHD, 16 with ASD, and 19 with co-occurring ASD+ADHD. I usually analyse the data from this sample in a 2 x 2 factorial ANOVA/ANCOVA, with the group factors ASD-yes/ASD-no and ADHD-yes/ADHD-no, and examine main effects of ASD and ADHD and their interaction. There are no repeated measures data (unlike in David De Wilde's post on 2 x 2 factorial designs a few months ago). 

I have constructed the design matrix as pasted below, with the first column modelling the intercept, second column modelling the ASD factor, third modelling the ADHD factor, and fourth the interaction. 

For the contrasts, I have 0 1 0 0 to test the main effect of ASD, 0 0 1 0 to test the main effect of ADHD, and 0 0 0 1 for the interaction.

Do these look correct? Also, if I want to add a covariate, do I simply add the values to a final (fifth) column as I would for a normal ANOVA design?

1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1

Many thanks 
Lizzie
Apr 18, 2018  12:04 PM | Andrew Zalesky
RE: Design matrix & contrast for 2 x 2 (group) factorial ANOVA in NBS
Hi Lizze,

the design matrix and contrasts appear to be correct.

Note that you might also want to test the contrasts of 0 -1 0 0 and 0 0 -1 0, depending on whether your hypothesis involves increased or decreased connectivity in the patient groups.

To add a covariate, simply add a fifth column including the values of the covariate, and remember to add a zero to each contrast.

Andrew


Originally posted by Lizzie Shephard:
Dear all

I was hoping someone could check that the design matrix and contrasts I am specifying for NBS are correct.

I have a sample of 19 control participants, 15 participants with ADHD, 16 with ASD, and 19 with co-occurring ASD+ADHD. I usually analyse the data from this sample in a 2 x 2 factorial ANOVA/ANCOVA, with the group factors ASD-yes/ASD-no and ADHD-yes/ADHD-no, and examine main effects of ASD and ADHD and their interaction. There are no repeated measures data (unlike in David De Wilde's post on 2 x 2 factorial designs a few months ago). 

I have constructed the design matrix as pasted below, with the first column modelling the intercept, second column modelling the ASD factor, third modelling the ADHD factor, and fourth the interaction. 

For the contrasts, I have 0 1 0 0 to test the main effect of ASD, 0 0 1 0 to test the main effect of ADHD, and 0 0 0 1 for the interaction.

Do these look correct? Also, if I want to add a covariate, do I simply add the values to a final (fifth) column as I would for a normal ANOVA design?

1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 -1 1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 -1 1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 -1 -1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1

Many thanks 
Lizzie
Apr 23, 2018  01:04 AM | Lizzie Shephard - King's College London
RE: Design matrix & contrast for 2 x 2 (group) factorial ANOVA in NBS
Many thanks for your help, Andrew!
Oct 12, 2018  09:10 PM | Alessio Bellato - University of Nottingham
RE: Design matrix & contrast for 2 x 2 (group) factorial ANOVA in NBS
Thanks Lizzie and Andrew for your discussion, it has been really helpful for the work I am doing.
I have a very similar design as Lizzie, apart from the fact that I need to add a repeated measure to it.

I am at the point of setting up a repeated measures ANOVA 1 between-subjects variable, which I think I have done correctly (could you check the attached file, please?). In this case, I would be able to test the condition effect, and the conditionXgroup effect.

However, the design I need to use is a 2x2x2 ANOVA (1 repeated measure, 2 between-groups variable), that's why I wrote under Lizzie's post. In fact, the 2x2 design she used would be exactly the same which I would need to use for my analysis. How can I transform the previous design (repeated measures 2x2) in a 2x2x2 ANOVA?

I looked at the slides you (Andrew) suggested: http://mumford.fmripower.org/setting_up_designs_2009.pdf, however I can't figure it out how to do it!
Thanks in advance for your help.

Many regards,
Alessio
Oct 15, 2018  12:10 PM | Andrew Zalesky
RE: Design matrix & contrast for 2 x 2 (group) factorial ANOVA in NBS
Hi Alessio,

I assume that your attached design matrix is such that the 2nd last column is the condition effect (repeated measure) and the last column is the interaction effect (group x condition). And you have excluded the column for the group effect. If this is the case, then the design matrix is correct. Remember to use exchange blocks.

I'm not certain that I fully understand your 2x2x2 design, but presumably all that you need to do is include another interaction effect for the second between-group variable. However, you sample size is modest (~90) and thus this kind of design may be under-powered. My preference would be to run to separate 2x2 ANOVAs.

Andrew

Originally posted by Alessio Bellato:
Thanks Lizzie and Andrew for your discussion, it has been really helpful for the work I am doing.
I have a very similar design as Lizzie, apart from the fact that I need to add a repeated measure to it.

I am at the point of setting up a repeated measures ANOVA 1 between-subjects variable, which I think I have done correctly (could you check the attached file, please?). In this case, I would be able to test the condition effect, and the conditionXgroup effect.

However, the design I need to use is a 2x2x2 ANOVA (1 repeated measure, 2 between-groups variable), that's why I wrote under Lizzie's post. In fact, the 2x2 design she used would be exactly the same which I would need to use for my analysis. How can I transform the previous design (repeated measures 2x2) in a 2x2x2 ANOVA?

I looked at the slides you (Andrew) suggested: http://mumford.fmripower.org/setting_up_designs_2009.pdf, however I can't figure it out how to do it!
Thanks in advance for your help.

Many regards,
Alessio