Topic 9B: Repeated measures analysis

In this topic, we will consider a method often used to carry out analyses of repeated measures data. Repeated measures data is data for which we have more than one measurement for each individual.

1 Repeated Measures ANOVA

🏡 In Topic 7 and the associated Computer Lab, we learnt about one-way ANOVA. Since one-way ANOVA allows us to test for a difference in means between two or more independent groups, we can think of it as an extension of the independent samples \(t\)-test, which tests for differences in means between two independent groups.

In a similar way, Repeated Measures ANOVA can be thought of as an extension to the paired \(t\)-tests. Whereas the paired \(t\)-test tests for mean differences between two dependent groups, Repeated Measures ANOVA allows us to test for differences in means between two or more dependent groups.

In this question, we will work through an example in jamovi.

1.1

🏡 The data set we will be using today is from the datarium R package (Kassambara 2019). In particular, we will be using a data set called selfesteem. This data set records the self-esteem score of ten individuals three times each, i.e., at three different time points. Later on, we will be using repeated measures ANOVA to see whether there was a significant change in the average self-esteem scores over time.

First, let’s take a look at the selfesteem data set:

##    id       t1       t2       t3
## 1   1 4.005027 5.182286 7.107831
## 2   2 2.558124 6.912915 6.308434
## 3   3 3.244241 4.443434 9.778410
## 4   4 3.419538 4.711696 8.347124
## 5   5 2.871243 3.908429 6.457287
## 6   6 2.045868 5.340549 6.653224
## 7   7 3.525992 5.580695 6.840157
## 8   8 3.179425 4.370234 7.818623
## 9   9 3.507964 4.399808 8.471229
## 10 10 3.043798 4.489376 8.581100

As we can see, the data set contains the following variables:

  • id : the ID of the individual (ranges from 1 to 10)
  • t1 : self-esteem score at time-point 1
  • t2 : self-esteem score at time-point 2
  • t3 : self-esteem score at time-point 3

So, there is one row for each individual in the data set. This means data set is currently in “wide format” (as opposed to “long format”, which has one row per time-point and multiple rows for each individual).

1.2

💻 Download the file called selfesteem.csv from the LMS and open it in jamovi. Then watch the following video:

1.3

💻 Now that the data has been loaded into jamovi, a useful first step will be to explore the data. Create a descriptives table for t1, t2 and t3, as well as a density plot for each variable.

1.4

🏡 The hypotheses for a repeated measures ANOVA can be set up as follows:

\[ H_0 : \mu_1 = \mu_2 = \ldots = \mu_k \text{ versus } H_1 : \text{not all } \mu_i \text{'s are equal,}\] where:

  • For some number of \(k\) time-points (or conditions), \(\mu_1, \mu_2, \ldots, \mu_k\) denote the population mean for time-point 1, time-point 2, …, and time-point \(k\) respectively.

In our example, we wish test for a difference in average self-esteem scores across time-points. For this example,

  1. Write down the null and alternative hypothesis.
  2. What is the dependent (response) variable? 💬
  3. What is the independent variable? 💬

1.5

💻 Carry out a repeated measures ANOVA analysis in jamovi, including post-hoc tests with both Tukey and Bonferroni corrections selected. Also create an Estimated Marginal Means plot with confidence intervals for the error bars, with observed scores displayed.

1.6

🏡 From the repeated measures analysis carried out, we can note the following:

  • The \(p\)-value (read from the p column in the Within Subjects Effects table) is close to 0, i.e. \(p < .001\)
  • The test statistic (F value) is \(F = 55.469\)
  • For a repeated measures analysis, we have that:
    • \(d_1 = r - 1\), where \(r\) is the number of time-points (or conditions)
    • \(d_2 = (n - 1)(r - 1)\), where \(n\) is equal to the number of individuals

Using this information, answer the following questions:

  1. Do we have enough evidence to conclude that there is a statistically significant difference in self-esteem scores across time? 💬
  2. What is \(d_1\)? 💬
  3. What is \(d_2\)? 💬
  4. Fill in the blanks to summarise our results: There [was/was not] a significant difference in mean self-esteem score [\(F\)(…, …) = …, \(p\) …] across time. 💬

1.7

🏡 In the previous question, we established that there was a significant difference in the mean self-esteem score across time. However, we do not know which time-point(s), or how many time-points, are significantly different from each other.

Based on your jamovi output and referring to the \(p\)-values with Bonferroni corrections, which time-points were significantly different from each other? Justify your answer with appropriate \(p\)-values. 💬

2 Still much to do

This week, we considered a brief introduction to repeated measures analysis using Repeated Measures ANOVA. Although we don’t have time in this subject, there is still much more to do using this techniques, including checking relevant assumptions, and adding more independent variables to our model. Another technique called Linear Mixed Effects Models is an alternative to Repeated Measures ANOVA and affords us added flexibility in the analysis. If you use statistics in your future studies or career, you may have a chance to learn more about these methods. But for now, that’s all for this week!

That’s all for this week! If you still have time, you may wish to work on your assessments.

References

Kassambara, Alboukadel. 2019. Datarium: Data Bank for Statistical Analysis and Visualization. https://CRAN.R-project.org/package=datarium.


These notes have been prepared by Amanda Shaker. The copyright for the material in these notes resides with the authors named above, with the Department of Mathematical and Physical Sciences and with La Trobe University. Copyright in this work is vested in La Trobe University including all La Trobe University branding and naming. Unless otherwise stated, material within this work is licensed under a Creative Commons Attribution-Non Commercial-Non Derivatives License BY-NC-ND.