One between subjects factor and two within subjects factors

Introduction

On this webpage, we will focus on repeated measures ANOVA where there are two within-subjects factors and one between-subjects factor. We will assume that the sphericity assumption has been met and so won’t deal with correction factors. We also won’t explore follow-up testing since these are described extensively elsewhere (click here or here for more details).

Example

Example 1: Suppose there are three groups (G1, G2, G3), and each subject in these three groups was given 4 types of dexterity tests (T1, T2, T3, T4), each repeated once using the left hand and the other using the right hand. All the subjects in the experiment were right-handed. The data for this example are as shown in Figure 1.

Data

Figure 1 – Data for Repeated Measures ANOVA 2W+1B

The three groups make up the three levels of the between-subjects factor (Group), which we will label A. The tests make up the 4 levels of a within-subjects factor (Test), which we will label B. The two hands make up the levels of the other within-subjects factor (Hand), which we will label C.

We use the scheme described in Figure 2. Here a = # of Factor A levels, b = # of Factor B levels, c = # of Factor C and m = # of subjects.

Scheme

Figure 2 – Sources of Variation

Data Analysis Tool

Real Statistics Data Analysis Tool: The repeated measures ANOVA analysis required for one between-subjects factor and two within-subjects factors can be performed using Real Statistics’ Mixed Three-way Repeated Measures Anova data analysis tool.

For Example 1, press Ctrl-m and click on the Anova tab (or choose the ANOVA option if using the original user interface). Next, choose the Mixed Three-way Repeated Measures Anova option. Fill in the dialog box that appears as shown in Figure 3.

Dialog box

Figure 3 – Mixed Three-way Repeated Measures Anova dialog box

After pressing the OK button, the output shown in Figures 4, 5 and 6 are displayed.

Results part 1

Figure 4 – Repeated Measures ANOVA output (part 1)

Results part 2

Figure 5 – Repeated Measures ANOVA output (part 2)

Results part 3

Figure 6 – Repeated Measures ANOVA output (part 3)

Representative Formulas

Representative formulas from Figures 4 and 5 are shown in Figure 7.

Count and mean formulas

Figure 7 – Formulas from Figures 4 and 5

Representative formulas from Figure 6 about degrees of freedom are shown in Figure 8, while those about SS are shown in Figure 9.

df formulas

Figure 8 – Df formulas from Figure 6

SS formulas

Figure 9 – SS formulas from Figure 6

References

6 thoughts on “One between subjects factor and two within subjects factors”

  1. Hello,

    I am curious of how you interpret the results of the output for the test presented? I understand the rows with a P-value lower than the alpha would equate to statistically significant, but what would be the data you include in the post-hoc, for say a post-hoc analysis on Factor C?

    Thanks!

    Reply
  2. Dear Charles,

    I appreciate you taking the time to reply, and I apologize for the broken link. The amended version, which I hope will work: https://onlinelibrary.wiley.com/doi/10.1002/1521-4036%28200010%2942%3A6%3C663%3A%3AAID-BIMJ663%3E3.0.CO%3B2-7
    https://onlinelibrary.wiley.com/doi/epdf/10.1002/1521-4036%28200010%2942%3A6%3C663%3A%3AAID-BIMJ663%3E3.0.CO%3B2-7
    Currently, the test is compiled within the R package, so you may find it interesting to check out: https://cran.r-project.org/web/packages/nparLD/nparLD.pdf
    Should the links not work, then I can email you the papers.

    Best regards,
    Magdy

    Reply
  3. Hi Charles,

    I really appreciate this valuable website. Using a random group of 30 calves, we conducted an experiment in which the effects of three drugs on behavioral pain scores were tested. The measurements were performed before giving any treatments (baseline) and at intervals thereafter. We are interested to statistically test the differences between the groups/treatments (treatment effect), within each treatment in relation to the baseline (time effect), as well as the mixed effect of time and treatment. Is there any non-parametric test that can be performed since these variables are non-normally distributed? A Brunner-Langer longitudinal data model was used elsewhere to analyze similar data elsewhere (https://onlinelibrary.wiley.com/doi/10.1002/1521-4036(200010)42:6%3C663::AID-BIMJ663%3E3.0.CO;2-7). Can it also be used here, and would it be part of the real statistics add-in package?

    Thank you!
    Magdy

    Reply
    • Hello Magdy,
      This is an interesting topic, but currently, Real Statistics doesn’t provide support for the Brunner-Langer longitudinal data model.
      I tried clicking on the link you provided, but I get an error message.
      I see that Brunner and Langer have a book, but, not surprisingly, I was unable to download the book.
      Charles

      Reply

Leave a Comment