How can a repeated measures ANOVA be performed by hand?

A repeated measures ANOVA is a statistical test used to analyze the differences between multiple measurements taken from the same individuals or groups. It is typically performed using specialized software, but it can also be done by hand. To perform a repeated measures ANOVA by hand, the data must first be organized into a table with the different measurements as columns and the individuals or groups as rows. Next, the mean for each measurement must be calculated. Then, the within-subjects sum of squares, between-subjects sum of squares, and total sum of squares must be calculated using specific formulas. These values can then be used to calculate the F-statistic, which can be compared to a critical value to determine the statistical significance of the results. Performing a repeated measures ANOVA by hand requires a thorough understanding of the calculations and can be a time-consuming process, but it can provide valuable insights into the data.

Perform a Repeated Measures ANOVA By Hand


repeated measures ANOVA is used to determine whether or not there is a statistically significant difference between the means of three or more groups in which the same subjects show up in each group.

This tutorial explains how to perform a one-way repeated measures ANOVA by hand.

Example: One-Way Repeated Measures ANOVA by Hand

Researchers want to know if three different drugs lead to different reaction times. To test this, they measure the reaction time (in seconds) of five patients on each drug. The results are shown below:

Since each patient is measured on each of the three drugs, we will use a one-way repeated measures ANOVA to determine if the mean reaction time differs between drugs.

Use the following steps to perform the repeated measures ANOVA by hand:

Step 1: Calculate SST.

First, we will calculate the total sum of squares (SST), which can be found using the following formula:

SST = s2total(ntotal-1)

where:

  • s2total: the variance for the entire dataset
  • ntotal: the total number of observations in the entire dataset

In this example we calculate SST to be: (64.2667)(15-1) = 899.7

Step 2: Calculate SSB

Next, we will calculate the between sum of squares (SSB), which can be found using the following formula:

SSB = Σnj(xxtotal)2

where:

  • Σ: a greek symbol that means “sum”
  • nj: the total number of observations in the jth group
  • xj: the mean of the jth group
  • xtotal: the mean of the entire dataset

In this example we calculate SSB to be: (5)(26.4-22.533)2 +(5)(25.6-22.533)2 + (5)(15.6-22.533)2362.1

Step 3: Calculate SSS.

Next, we will calculate the subject sum of squares (SSS), which can be found using the following formula:

SSS =(Σr2k/c) – (N2/rc)

where:

  • Σ: a greek symbol that means “sum”
  • r2k: squared sum of the kth patient
  • N: the grand total of the entire dataset
  • r: total number of patients
  • c: total number of groups

In this example we calculate SSS to be: ((74+ 422 + 62+ 922 + 682)/3) – (3382/(5)(3)) = 441.1

Step 4: Calculate SSE.

Next, we will calculate the error sum of squares (SSE), which can be found using the following formula:

SSE = SST – SSB – SSS

In this example we calculate SSE to be: 899.7 – 362.1 – 441.1 = 96.5

Step 5: Fill in the Repeated measures ANOVA table.

Now that we have SSB, SSS, and SSE, we can fill in the repeated measures ANOVA table:

Source Sum of Squares (SS) df Mean Squares (MS) F
Between 362.1 2 181.1 15.006
Subject 441.1 4 110.3
Error 96.5 8 12.1

Here is how we calculated the various numbers in the table:

  • df between: #groups – 1 = 3 – 1 = 2
  • df subject: #participants – 1 = 5 – 1 = 4
  • df error: df between * df subject = 2*4 = 8 
  • MS between: SSB / df between = 362.1 / 2 = 181.1
  • MS subject: SSS / df subject = 441.1 / 4 = 110.3
  • MS error: SSE / df error = 96.5 / 8 = 12.1
  • F: MS between / MS error = 181.1 / 12.1 = 15.006

Step 6: Interpret the results.

The F test statistic for this one-way repeated measures ANOVA is 15.006. To determine if this is a statistically significant result, we must compare this to the F critical value found in the F distribution table with the following values:

  • α (significance level) = 0.05
  • DF1 (numerator degrees of freedom) = df between = 2
  • DF2 (denominator degrees of freedom) = df error = 8

We find that the F critical value is 4.459.

Since the F test statistic in the ANOVA table is greater than the F critical value in the F distribution table, we reject the null hypothesis. This means we have sufficient evidence to say that there is a statistically significant difference between the mean response times of the drugs.

x