# How to determine the sample size needed for repeated measurement ANOVA?

I need some help about repeated measurement ANOVA.

We are investigating the effect of some intervention on reducing blood stream infection (BSI) rate in some wards. We plan to capture the BSI rate information at a monthly basis, 12 months without intervention first, then 12 months with intervention.

We are thinking of doing either time-series or repeated measurement ANOVA, I prefer the later one before I don't have much idea to do on the first one (extra question: too little time points, right?), but then here come another problem, how many wards do we need to show that there is really a statistically significant effect of intervention on BSI rate?

I think I'll do two ANOVA, one for "before intervention", one for "during intervention", and I suppose that the ANOVA "before intervention" should not have a significant F-ratio test.

I consider the term "sample size" two-dimensionally, either the number of wards, or the number of repeated measurements.

• You need to look at power calculations. Searching for "power calculations for repeated measurements" in Google provides a good starting point. The first hit seems to give some good pointers. Aug 18, 2010 at 11:03

How to perform power analysis on repeated measures ANOVA?

G*Power 3 is free software that provides a user-friendly GUI interface for performing power calculations. It supports power calculations for repeated measures ANOVA.

What is the appropriate analysis for your design?

Here are a range of points related to what you have mentioned:

• More time points will give a clearer indication of how the effect, if any, of your intervention operates over time. Thus, if the improvements decay over time or get greater, more time points will give a clearer sense of these patterns, both on average, and at an individual-level.
• If you have 12 time points or more, I'd look at multilevel modelling, particularly if you are expecting any missing observations. You are unlikely to be interested in whether there is an effect of time. Rather you are likely to be interested in various specific effects (e.g., changes pre and post intervention; perhaps a linear or quadratic improvement effect post-intervention). You could also look at using planned contrasts on top of repeated measures ANOVA. Applied Longitudinal Data Analysis: Modeling Change and Event Occurrence is a good starting point to learn about multilevel modelling of repeated measures data.
• The number of time points over and above pre- and post- wont do much to increase your power to detect the effect of your intervention. More time points will increase your reliability of measurement, and it might ensure that you capture the time period where the effect applies, but probably the bigger issue will be the sample size in the two conditions.
• Assuming you are truly randomly allocating cases to conditions, the populations are by definition equal on the dependent variable, and one could argue that a significance test of baseline differences is meaningless. That said, researchers often still do it, and I suppose it does provide some evidence that random allocation has actually occurred.
• There is a fair amount of debate about the best way to test the effect of an intervention in a pre-post-intervention-control design. A few options include: (a) the condition * time interaction; (b) the effect of condition but just at post intervention; (c) an ANCOVA looking at the effect of condition, controlling for pre, with post as the DV.
• Thank you for the answer Jeromy. Did you happen to find something similar in R ? Aug 18, 2010 at 13:01
• @Tal Quick-R lists a few power analysis procedures in R: statmethods.net/stats/power.html ; or you can use R to run a simulation for custom power analysis. The lme4 package is good for multilevel modelling. Aug 18, 2010 at 15:01
• Thanks Jeromy. I think I'll just ask here on how to do that. I have wrote code in the past for power analysis, but they tended to get complex - I would be curious to see how betteR coder then me would solve this. Aug 19, 2010 at 1:32
• Jeromy Anglim,your answer is very useful. Could you give some referrence on the number of time points on repeated measurement? How do I know the minimum number of time points when I use repeated measurement ANOVA to do a clinical trial? Thanks in advance. May 10, 2012 at 10:44
• @FloraZhou Welcome to the site! Please note that it is a Q&A not a forum, so please consider asking a new question. You can read more about how this site works in the FAQ.
– user88
May 10, 2012 at 11:57