# Not all subjects undergo conjunction of two treatments, two-way within-subject (repeated-measures) ANOVA correct?

I am wondering about the correct statistical analysis for an experiment involving 2 independent variables (treatment A, 4 levels and treatment B, 2 levels) and one dependent variable (C, score). Because subjects undergo all levels of both treatments, I am assuming a two-way within-subject (repeated-measures) ANOVA (4x2) should be used.

However, there is a complicating factor: we used a setup in which we measured C for 2 subjects together, according to the following scheme:

\begin{array}{| l | c | r |} \hline & \text{B level 1} & \text{B level 2}\\ \hline \text{A level 1} & \text{Subject 1} & \text{Subject 2}\\ \text{A level 2} & \text{Subject 2} & \text{Subject 1}\\ \text{A level 3} & \text{Subject 1} & \text{Subject 2}\\ \text{A level 4} & \text{Subject 2} & \text{Subject 1}\\ \hline \end{array}

When looking at treatment A, all subjects undergo levels 1 to 4, so within-subject design. Also, when looking at treatment B, all subjects undergo levels 1 and 2, so again within-subject design.

However, it is not the case that all subjects undergo all levels of A in conjunction with all levels of B, e.g. subject 1 has undergone A level 1 in conjunction with B level1, but not with B level 2. And vice versa for subject 2.

Hence, I am inclined to think that regarding interaction between treatment A and B, a within-subject design might not be correct. Any suggestions would be appreciated.

• Why was it designed this way? It looks like there are anticipated A:B interactions within subjects that are being intentionally avoided.
– John
Commented Jun 18, 2013 at 15:14
• It was designed like this so we could measure 2 subjects at the same time (eg. during Alevel 1: subject1 gets Blevel1 and during the same instance subject2 gets Blevel2; four runs are required to go through all levels of A). So it was mostly convenience, ie. saving time. In retrospect this might not have been the best way. But this is the data we have... Commented Jun 19, 2013 at 12:41
• You're right that the interaction isn't a within S design. But the A and B effects aren't within design anymore either. Subject 1 here only experiences A1 and A3 while subject 2 experiences A2 and A4.
– John
Commented Jun 19, 2013 at 19:47
• well, subject 1 experiences A1 and A3 while undergoing B1, and A2 and A4 while undergoing B2. So, if the B levels are ignored, subject 1 experiences all levels of A (and the inverse for subject 2). As such, I guess I could treat A and B separately as within subject design, and use for their interaction a between subject design? Commented Jun 20, 2013 at 7:31
• Sorry, I misread the question, you're right, each of the main effects is within. But, you're changing the power of tests to and fro the going within and between.
– John
Commented Jun 20, 2013 at 14:06

Within and between ANOVA's are an interesting subject.

Consider the assumption of independence. Let's imagine you run a full repeated measures design but the data came out so that each condition really had a correlation of 0. So, the experiment isn't designed for full independence but it appears in the data. The resulting repeated measures ANOVA SS would be the same as for an independent measures ANOVA SS of the same data. The reverse is not true though. If you have a full independent measures design and there are some random amounts of correlation (very likely), then the repeated measures ANOVA will be more sensitive than the between.

I'd say that you can just analyze these data as if they were independent samples. You'll probably lose power but you'll still be able to analyze the data. You're simply not accounting for the (probable) within S correlation. In fact, you're breaking the relationship all together and pairing of data isn't occurring. While independent group designs cannot be analyzed with a repeated measures ANOVA because they will account for spurious correlations you could get away with the reverse and just admit your power is low because of it.

You might also want to look into multi-level modelling here. I know it can handle repeated measures with empty cells but I'm not recommending it because I'm not sure what it would do with this kind of a design. Perhaps someone more expert on them could speak to that. I think you definitely could not get away with just modeling A, B, and A:B as fixed effects with subjects as a random effect. You'd need random A and B effects at least.

Since subjects were run in pairs, I would use an ordinary repeated measures analysis with Subjects replaced by Pairs: Pairs (n) x A (4) x B (2), with A and B fixed and Pairs random. The error terms for the A, B, and AB effects would be the corresponding interactions with Pairs.

(With regard to the table layout, I'm in the same state as you. It would be nice to have all the formatting rules and procedures given somewhere, with examples. The only information on formatting that I could find (in a jargon-filled file whose name I don't remember) was that a single carriage return would not be recognized unless it was preceded by two spaces.)

• That's an interesting idea, treat each pair of subjects as one subject. It might be OK. I'd be concerned that you run into a power imbalance because likely the most correlated part is what's paired within S and then between S within a pairing has low power, which results in an inordinately lower powered interaction measure. There's no reason to think the two subjects run together will be correlated much, if at all.
– John
Commented Jun 21, 2013 at 0:02