help > RE: Design matrix and contrast for 2 way ANOVA, and f-value
Dec 6, 2019  11:12 AM | davideit7
RE: Design matrix and contrast for 2 way ANOVA, and f-value
Hi Andrew,

thanks for the very quick reply. 

Yes, sorry distraction mistake. To be faster I've copied and pasted the interaction column from the placebo group to the drugs group without paying attention to the switch of sign in the previous columns.

Regarding to model the repeated measure,the matrix then would be (I'm modelling a situation with 4 subjects 2 for group (P = placebo; D = drugs), and 2 condition A and B)
1-P_A   1  1  1  0  0  0

1-P_B  -1 -1  1  0  0  0

2-P_A   1  1  0  1  0  0

2-P_B  -1 -1  0  1  0  0 

3-D_A   1 -1  0  0 -1  0

3-D_B  -1  1  0  0 -1  0

4-D_A   1 -1  0  0  0 -1

4-D_B  -1  1  0  0  0 -1

as you suggested: first column would represent the conditions, second column represent interaction, and then 1 column for each subject. However I have some doubt:

1- regarding the column for the subjects, for the treament group I've used -1 is it correct? Otherwise I was wondering how can I differenciated between the 2 treatment group?

2- Considering using "t-test" what would be now the contrast?
1/-1 0 0 0 0 0 0 0  to test whether there's a main effect of condition A or B?

0 1/-1 0 0 0 0 0 0  to test whether there's an interaction?
 
Is not clear to me what would be the contrast to test if there's a main effect of the treatment.

3- regarding the first desing (2nd column treatment, 3rd condition, 4th interaction)
1-P_A 1  1  1  1

1-P_B 1  1 -1 -1

2-P_A 1  1  1  1

2-P_B 1  1 -1 -1

3-D_A 1 -1  1 -1

3-D_B 1 -1 -1  1

4-D_A 1 -1  1 -1

4-D_B 1 -1 -1  1
 
I suppose the results are going to be different compare with the other model. Which solution would you suggest?

I'm sorry for the naive questions but my experience with the GLM is zero, I've just started to approach it.

Thanks again for the attention.
Davide

Threaded View

TitleAuthorDate
Woomi Ban May 30, 2019
davideit7 Dec 5, 2019
Andrew Zalesky Dec 6, 2019
RE: Design matrix and contrast for 2 way ANOVA, and f-value
davideit7 Dec 6, 2019
Andrew Zalesky Dec 7, 2019
davideit7 Jan 20, 2020
Andrew Zalesky Jan 21, 2020
davideit7 Jan 22, 2020
Andrew Zalesky Jan 23, 2020
Woomi Ban Jun 10, 2019
Andrew Zalesky Jun 10, 2019
Andrew Zalesky Jun 1, 2019