ANOVA with Repeated Measures

In this part of the website, we apply the ANOVA methodology of One-way ANOVA and Two-way ANOVA to an extension of the paired samples analysis studied in Paired Sample t-Test. This analysis is called ANOVA with Repeated Measures. Here the rows correspond to subjects or participants in the experiment and the columns represent treatments for each subject. Usually, the treatments represent the same treatment at different time intervals.

Topics

References

Howell, D. C. (2010) Statistical methods for psychology (7th ed.). Wadsworth, Cengage Learning.
https://labs.la.utexas.edu/gilden/files/2016/05/Statistics-Text.pdf

Winer, B. J. (1962) Statistical principles in experimental design. McGraw-Hill
https://psycnet.apa.org/record/2008-16855-000

Maxwell, S. E., Delaney, H. D., Kelley, K. (2018) Designing experiments and analyzing data. Routledge.
https://www.routledge.com/Designing-Experiments-and-Analyzing-Data-A-Model-Comparison-Perspective/Maxwell-Delaney-Kelley/p/book/9781138892286

164 thoughts on “ANOVA with Repeated Measures”

  1. Charles –

    Thank you for this great resource! I am working to learn Real Statistics both for my own research, and to teach to our Stats and Research Methods students (moving away from the expensive SPSS).

    Right now I am trying to do a 2-factor repeated methods ANOVA, but I can’t figure out how to run the ANOVA in Real Statistics. I have my data set up with subjects as rows, then the four conditions (2 color types, 2 stimulus types) in columns. Which ANOVA function do I use? I see a one-way/one-factor repeated measures ANOVA, or a mixed factors repeated measures ANOVA, two factor without repeated measures, but not two factor repeated measures. I hope that I can do this in Real Statistics, and not have to go back to SPSS!

    Thank you for your help.

    Reply
  2. Hello Charles
    Sorry the last posting was incomplete and ‘post’ button got pressed accidentally

    I have 2 groups, one of 24 and the other of 21 subjects treated with placebo or drug respectively. They all went through a battery of cognitive function tests at months 0 (no treatment), months 1, 2, 3(treated with drug or placebo), and 4 months(no treatment). I wanted to do a do a 2-way repeated measures ANOVA but how can do on the equal group sizes?
    Thanks Norman

    Reply
  3. Hi Charles. I would like to ask a question. In my research I have 4 formulations that were analyzed during 4 weeks for microbial growth. It turns out that I only have one line of data for each formulation. Therefore, I cannot perform a repeated measures ANOVA due to insufficient data. How can I perform the analysis?

    Reply
    • Hello Tatiana,
      Are you saying that you only have one subject for each of the 4 formulations and each subject measured only during the course of 4 weeks (perhaps weeks 1, 2, 3, 4)?
      What hypothesis or hypotheses are you trying to test?
      Charles

      Reply
  4. Hi would like to analyze a dataset obtained after conducting behavioral experiments in mice. The mice were grouped under 2 independent factors (factor 1: control and transgenic ; factor 2: male and female). Mice were tested 7 different times (repeated measures). Independent variable is continuos and normally distributed. So, I was planning to use a 2way repeated measured ANOVA. I am intereested in the factor 1-factor 2 interaction along time. But, the whole experiment was repeated twice in two independent cohorts of animals. So, I would was thinking in a nested design using cohorts as nesting factor. However I don´t know if I can performed both analysis under 1 ANOVA design. How can I do that? Any advice regarding alternative ways of analyzing the 2 cohorts in 1 design?
    Thanks a lot
    Juan

    Reply
    • Hi Juan,
      I understand the following:
      Factor 1: Control vs Transgenic
      Factor 2: Male vs Female
      Factor 3: Cohort 1 vs Cohort 2
      Repeated Measures: 7 specific time intervals

      Is this correct?
      How many animals are in each cohort?
      Is there any unifying way that the sample was chosen for each cohort? E.g. cohort 1 was chosen from the forest and cohort 2 was chosen from the grasslands?
      What hypothesis or hypotheses are you trying to test?

      Charles

      Reply
      • Hi Charles,
        I understand the following:
        Factor 1: Control vs Transgenic
        Factor 2: Male vs Female
        Factor 3: Cohort 1 vs Cohort 2
        Repeated Measures: 7 specific time intervals
        CORRECT !!
        Each cohort contains 24 mice. The cohorts are replicas, for example cohort 1 control males are are identical to cohort 2 control males, and so on. Mice were tested in cohorts since it was not posible to run 44 mice in a single experiment. I am interested in testing Factor 1 x Factor 2 X time interaction. Cohort comparison is not relevant for us, but I would like to minimize the influence of inter-cohort variability in the analysis of the other factors.
        Thanks a lot for your help!!
        J

        Reply
        • Juan,
          Since the same subjects are in both cohorts I can’t think of a way of taking the cohorts into account in the same analysis. It seems that you can choose one cohort randomly and do the analysis on that cohort. Alternatively, you can do two separate analyses, one for each cohort, although interpreting the results becomes a little more complicated.
          Charles

          Reply
          • Hi, I think I did not describe the design correctly, so sorry. The cohorts are made from independent subjects, what I meant by replicas is that cohort 1 and cohort 2 were taken form the same population, experiments were run in 1 set of 24 mice in January (cohort 1) and experiments were repeated in complete independent set of mice (same experimental groups) several months later. Experiments were conducted identically in cohort 1 and cohort 2. Best
            J

          • Do you think that the cohort choice influences the results? If so, what is different about the cohort? If not, why can’t you simply combine the data from both cohorts into one larger cohort?
            Charles

  5. Hi, I have one tree species and one treatment in respect to the control at diffrent time intervals. How to form interaction between treatment and intervals … Does here we use repeated measurment ONE WAY ANOVA

    Reply
  6. Hello,

    I have 3 groups (students who were taught 100% in person, students who were taught 100% remote, and students who had mixed in-person and remote lessons). I gave each student a pre-test for a unit and after the unit was complete they each took a post-test.

    I am comparing their growth after instruction. So I am comparing the difference between the two scores (post-test score- pre-test score= growth). Would this be a one way repeated measures ANOVA because they did each take a pre and post-test, or would it just be a one way ANOVA because I am just comparing the one result (the one I am calling growth) for each student.

    Reply
    • Nicole,
      If you only care about comparing pre-test with post-test, you can use a paired t-test. This is equivalent to a one-way repeated measures ANOVA, but since you only have two measurements you can use the simpler test.
      You also said that you have three groups. If you want to compare the results between the three groups, then you have a few choices, namely one-way ANOVA (using the differences between the post- and pre-test measures), Repeated Measures ANOVA with one within-subjects factor (pre vs post) and one between-subjects factor (the three groups) and ANCOVA. See the following webpage for details about these approaches:
      https://www.real-statistics.com/analysis-of-covariance-ancova/pretest-posttest-design/
      Charles

      Reply
  7. Dear Dr Charles.

    This is my scenario. I want to test whether students prepare better with the implementation of a subminimum to write exams.
    I have data of 3 years before the implementation of the requirement and 3 years after and would like to know, if they prepare better to attain the subminimum; if hostel students perform better than privately accommodated students and those who got admission to write their exams, will actually pass.
    I have all the information in these regards.

    I thank you
    From South Africa…
    Bevon Clarke

    Reply
      • My question is Whether the students prepare better based on their year marks attained during the year, now that a subminimum requirement is in place compared to previously when it was not in place.

        Hope this is understandable …
        Thank you.

        Reply
  8. Hi Charles, a little help please 🙂
    My experiment is:
    30 people doing 2 minutes of cardiopulmonary resuscitation (CPR) on a baby manikin using (i) dominant hand (DH), 1 minute break and the same with (ii) non-dominant hand (NDH).
    We are comparing 4 different variables for DH and NDH: chest compression rate, depth, pauses and release of chest.
    We don’t need to compare the variables between themselves, just 1 variable with DH with the same variable with NDH. For example – is there a difference in rate for DH and NDH? Is there a difference in depth between DH and NDH? etc
    Am I right to think that I need a repeated measure ANOVA? I wish I could do 4 different paired t-tests but I understand it is not very well accepted to do too many t-tests.
    A help will be appreciated.
    Thank you

    Reply
    • Hi Debora,
      1. If you are only comparing one variable at a time, then it is sufficient to do a paired t-test, which is the two-sample version of repeated measures ANOVA (provided the normality assumption is met; otherwise the signed-ranks test may be appropriate). In order to reduce the confounding effects, you should have half of the 30 people perform the CPR in order (i) followed by (ii) and the other half perform CPR in the opposite order, i.e. (ii) followed by (i).
      2. You could compare all 4 variables at the same time by using repeated measures MANOVA.
      3. All of the tests are covered on the Real Statistics website.
      Charles

      Reply
  9. Hi Charles. I have a question regarding Power analysis and a 2 within subjects factors RM ANOVA. I know that G power is unable to produce expected sample size when there’s more than 1 within subject factor. How could I go about this?

    Thank you.

    Reply
    • Hello Marco,
      It does seem difficult to find this sort of information. In fact, lately I have been investigating some related power and sample size issues. I can only give the following limited suggestions:
      1. Use the existing tools such as G*Power to provide estimates for simplified versions of what you are looking for and then make your best guess as to how these will relate to the problem that you are studying.
      2. Use simulation (I will add this to Real Statistics shortly in the case of the Mann-Whitney, Signed-Ranks and Tukey-HSD tests).
      3. Consult one of the following books since they may shed more light on this subject:
      Bausell and Li, Power Analysis for Experimental Research
      Cohen, Statistical Power Analysis for the Behavioral Sciences
      These may or may not be useful for your situation, but they describe a lot of different tests.
      Charles

      Reply
  10. Hello,
    I am attempting to run statistical analysis on my independent project in exercise physiology. It is comparing the same population of participants, but the one variable is that in one session the participants have a caffeine dosage while in the other session they use a placebo dosage. I cannot use a t-test because comparing means is not useful to my group as each individual subject has different athletic capabilities. I am trying to analyze how caffeine impacted each individual subject. We are observing the time it takes to reach exhaustion biking… Should i use ANOVA? & if so, what type of anova testing should I use. Thank you in advance

    Reply
    • Hello Christian,
      Generally in these sorts of situations, you would use a paired sample t test. It shouldn’t matter that the subjects have different athletic capabilities. If you also want to test the impact of athletic capability, you would use a repeated measures Anova with one between measures factor (athletic capability) and one within subjects factor (caffeine/placebo). There are a number of alternative tests in this case, including MANOVA.
      Charles

      Reply

Leave a Comment