help
help > Design matrix & contrast for 2 x 2 (group) factorial ANOVA in NBS
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
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
Threaded View
Title | Author | Date |
---|---|---|
Lizzie Shephard | Apr 17, 2018 | |
Alessio Bellato | Oct 12, 2018 | |
Andrew Zalesky | Oct 15, 2018 | |
Andrew Zalesky | Apr 18, 2018 | |
Lizzie Shephard | Apr 23, 2018 | |