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
sorry for the posting with truncated title (keyboard slip) , here it is more explicit !
Hi Philippe,
there is some ambiguity in your description but I will do my best to answer.
What you have described in (1) is all correct. But I assume that the subjects in group A are distinct individuals compared to the subjects in group B. If they are instead the same subjects, you may want to include a single column within-subject mean for each subject rather than modeling the within-subject mean separately for each group.
For option (2), I am a little confused about the set up. I wasn't sure if you mean that subjects can potentialluy crossover from one group to another at the second measuremnt. If this is not the case, and you rather have more than two repeated measurments, you may want to consider inference on the slopes (rates of changes) acorss the time points.
Kind regards,
Andrew
Originally posted by Philippe Peigneux:
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
Dear Andrew
Apologies if my description was ambiguous, and thanks for the effort 😊
What you have described in (1) is all correct. But I assume that the subjects in group A are distinct individuals compared to the subjects in group B. If they are instead the same subjects, you may want to include a single column within-subject mean for each subject rather than modeling the within-subject mean separately for each group.
Here it is indeed 2 distinct groups with different individuals, thus a 2*2 anova with one between- (group) and one within- (day) subject factors
Thanks a lot and best regards,
Philippe
%By inference on the slopes (rates of changes) across the time points, do you mean e.g. subtracting (or computing % change) matrices A and B , and then use the resulting matrices to compare time points day 1 and day 2 ?
Hi Phillipe
Yes - that's right. If you have more than two time points, analysis of slope can be informative and enable a straightforward statistical design and interpretation.
For exampe, you could fit a regression to the repeated measurements for each subject (i.e., one regression per subject) and then carry forward the slope estimates to the second level analysis.
The caveats of this approach is that it assumes change over time is linear and the estimation of slope on a per subject basis can be noisy with only a few time points. You could compute the noise/error in the fit of the slope and potentially weight observations by the reciprocal of this noise/error in the second level analysis. That said, the noise/error could just reflect that the change over time is not linear.
THanks for clarifying your earlier comments and best wishes for your analyses!
Kind regards,
Andrew
Originally posted by Philippe Peigneux:
Dear Andrew
there is some ambiguity in your description but I will do my best to answer.
Apologies if my description was ambiguous, and thanks for the effort 😊
What you have described in (1) is all correct. But I assume that the subjects in group A are distinct individuals compared to the subjects in group B. If they are instead the same subjects, you may want to include a single column within-subject mean for each subject rather than modeling the within-subject mean separately for each group.
Here it is indeed 2 distinct groups with different individuals, thus a 2*2 anova with one between- (group) and one within- (day) subject factors
For option (2), I am a little confused about the set up. I wasn't sure if you mean that subjects can potentialluy crossover from one group to another at the second measuremnt. If this is not the case, and you rather have more than two repeated measurments, you may want to consider inference on the slopes (rates of changes) acorss the time points.
No, actually in my real study I have 3 factors in total but 2*2*2 anova are definitely impossible to implement and even more to interpret 😊 In option (2) each subject is recorded 4 times (A and B at day 1, A and B at day 2) and there is no group factor, thus it is full within-subject repeated measurement anova. Since it is the same subjects, based on your answer to option (1) I would include a single column within-subject mean for each subject.
Thanks a lot and best regards,
Philippe
