help > ANOVA 2*2 with between and within factors vs. with only within factors , design & exchange blocks
Jan 9, 2026  03:01 PM | Philippe Peigneux
ANOVA 2*2 with between and within factors vs. with only within factors , design & exchange blocks

Dear Andrew, dear all


I know there is a lot of questions about ANOVA but I would appreciate checking the issue of 2*2 ANOVA with full repeated measures vs. within*between with you if you don't mind.


1) Between * Within ANOVA : I have a design in which subjects from two different groups (A & B, factor between) have two repeated measurements at day 1(d1) and day 2(d2, factor within) . There are 30 subjects per group but for the sake of simplicity I will restrict here the example to 3
Given that there are 2 separate groups, I built the matrix design this way:


A d1    1 1 1 0 0 0 0 0 
A d1    1 1 0 1 0 0 0 0
A d1    1 1 0 0 1 0 0 0
A d2    -1 -1 1 0 0 0 0 0 
A d2    -1 -1 0 1 0 0 0 0
A d2    -1 -1 0 0 1 0 0 0
B d1    -1 1 0 0 0 1 0 0
B d1    -1 1 0 0 0 0 1 0
B d1    -1 1 0 0 0 0 0 1
B d2    1 -1 0 0 0 1 0 0
B d2    1 -1 0 0 0 0 1 0
B d2    1 -1 0 0 0 0 0 1
(col1: interaction groups*day, col2: day, col3-6: Within-subjects mean group A, col7-9 Within-subjects mean group B)
And the exchange blocks based on within-subject factor day would be [1:3 1:3 4:6 4:6]


I can then test the interaction effect either using T or F-test with [1 0 0 0 0 0 0 0], and the main day effect with [0 1 0 0 0 0 0 0]  (or -1)


Is it correct ? And in particular, am I right to have within-subjects mean group A in different columns than Within-subjects mean group B ? 


2) Within * Within ANOVA :Now, let's imagine I have a similar design but with subjects who have 2 repeated measures A & B at day1 then 2 repeated measures A & B at day 2 , hence 4 measurements per subject.


Question is ; is it sufficient to modify the exchange block to reflect that one subject has four measurements, i.e. [1:3 1:3 1:3 1:3] ?


Or should I also adjust the design matrix and put in same columns Within-subjects mean cond A and Within-subjects mean condition B ?  , like here below :
A d1    1 1 1 0 0 0 
A d1    1 1 0 1 0 0
A d1    1 1 0 0 1 0
A d2    -1 -1 1 0 0
A d2    -1 -1 0 1 0
A d2    -1 -1 0 0 1
B d1    -1 1 1 0 0
B d1    -1 1 0 1 0
B d1    -1 1 0 0 1
B d2    1 -1 1 0 0
B d2    1 -1 0 1 0
B d2    1 -1 0 0 1
with exchange block [1:3 1:3 1:3 1:3] again ?


Thanks in advance for your support in using this nice NBS tool !


Philippe  


 

  Edited (Jan 9, 2026  03:01 PM)

Threaded View

TitleAuthorDate
ANOVA 2*2 with between and within factors vs. with only within factors , design & exchange blocks
Philippe Peigneux Jan 9, 2026
Andrew Zalesky Jan 9, 2026
Philippe Peigneux Jan 10, 2026
Andrew Zalesky Jan 10, 2026
Philippe Peigneux Jan 9, 2026