help > Design matrix and contrast for 2 way ANOVA, and f-value
May 30, 2019  02:05 PM | Woomi Ban
Design matrix and contrast for 2 way ANOVA, and f-value
Hi Dr.Zalesky,

Thank you for your efforts in creating this wonderful tool.
It's super easy and intuitive, and I can understand how to use this tool through the forum.
But still, I'm not sure my design matrix and contrast are correct.


I'd like to do 2x2 ANOVA analysis using NBS.
I have 4 groups(A,B,C,and D) and 41 subjects in total. Each group has sex and exposure differences as follows:

A: Female, Water (Number of Subjects: 12)
B: Male, Drug (Number of Subjects: 9)
C: Male, Water (Number of Subjects: 10)
D: Female, Drug (Number of Subjects: 10)

So I will use design matrix as follow:

1 -1 0 (for Group A)
-1 1 0 (for Group B)
-1 -1 0 (for Group C)
1 1 1 (for Group D)

The first column represents female(1) and male(-1).
The seconde column represents water(1) and drug(-1).
The third column represents the interaction of female and drug.

I'm interest in main effects of sex and exposure, and the interaction of sex and exposure.
So I will try below contrast:
1) main effect of sex: [1 0 0]
2) main effect of exposure: [0 1 0]
3) interaction of sex and exposure: [0 0 1]

I wonder if above design matrix and contrast are correct.
Especially, I wonder if the third contrast will show the sex x exposure interaction correctly.


Also, I think I need to select f-test for this analysis, but I'm confusing how can I calculate the f-value in this case.
Can I use (number of group - 1) for numerator and (number of subjects - number of group) for denominator?
So in this study numerator would be 3 and denominator would be 37. Is this correct?

Thank you so much!!
Woomi

Threaded View

TitleAuthorDate
Design matrix and contrast for 2 way ANOVA, and f-value
Woomi Ban May 30, 2019
Woomi Ban Jun 9, 2019
Andrew Zalesky Jun 9, 2019
Andrew Zalesky May 31, 2019