# Repeated measures within factors settings for G*Power power calculation

I'm trying to perform a power calculation with G*Power.

There are two quite important options, the meaning of which is not clear to me:

"Number of groups" - what is this? I have a 2x2 repeated measures factorial design. Does this mean there are four groups, or, as the rest of the internet suggests, is this box for between-subjects factors? If it's for between-subjects factors, I assume this is 1 for a repeated measures factorial.

"Number of measurements" - also not entirely clear. Is this the number of data points I collected per participant? What if they've been averaged before they go into the ANOVA? Or is this the number of within-subjects conditions? So 4 for my experiment?

Any guidance on the meaning of these settings much appreciated - as far as I can tell these are undocumented.

• I'm not sure where you are in GPower - perhaps tell us how you got there, but I think your number of groups is 1, and your number of measures is 4. – Jeremy Miles May 16 '13 at 20:04
• I'm in F tests, "ANOVA: Repeated measures, within factors", and I have selected the a priori calculation. – sjjg May 16 '13 at 20:18
• I see. You have one group, and 4 measures. If you say you have one measure, you can't proceed. – Jeremy Miles May 17 '13 at 0:12
• Could you add this as the answer? Might make it easier for anyone else looking :-) – sjjg May 17 '13 at 6:53

GPower is assuming you have your data set up so that a row is a case (often a person), and a column is a measure.

For example, if we measured Y on three occasions, we'd have Y1, Y2, Y3, and we'd have three measures.

The groups are when you have a between case predictor - for example gender or experimental group. So when you have a 2x2 repeated measures design, you have four measures.

However, GPower assumes that you want to do 1 test with 3 df, which you don't, you want to do 3 tests, with 1 df (2 main effects, 1 interaction). I suspect that you should therefore be entering two as the number of measures. (And then the other parameters depend upon which of the effects you want to base your power on). Power analysis for this type of design gets complicated rapidly, and it's not clear how to enter the appropriate parameters into GPower. I prefer one of two other approaches which allow you to enter the data in matrix format.

First, D'Amico, et al, showed how to do this in SPSS, using the (old) manova command: paper here: http://www.ncbi.nlm.nih.gov/pubmed/11816450

Second, I showed how to do this as a structural equation model, in a paper here: http://www.biomedcentral.com/1471-2288/3/27/

Both of those approaches are a bit trickier to start with, but they are a lot more flexible.

A third approach is to ignore the fact that it's repeated measures when estimating power. The higher the correlations between your measures, the more power you have. But you don't know what those will be. If you estimate power as if the measures were independent, you know that your power analysis is conservative. The problem is that if the correlations are high, the power analysis might be very, very conservative.

Jumping in a bit late, but I figured I'd build on @Jeremy's response and add some clarifying examples (as the 2x2 RM design is a bit ambiguous to me).

Assuming the "ANOVA: RM, within factors" option is where we're at, I believe the "number of groups" refers to the number of between-subjects LEVELS (not factors) that you have. Thus if you have two between-subjects factors, one with 2 levels and one with 3, you will have 2x3=6 as your "number of groups". With just one between subjects factor, you simply enter the number of levels in the factor as your groups (for sex, you'd have 2 groups (male/female)). Likewise, entering 1 would indicate that all members are from the same group.

As you have mentioned, "number of measurements" is the number of times that you measure each person. For example, a pre-post would be 2 measurements, and measuring each participant under 3 exercise conditions would be 3 measurements.

A full, simple example would be wishing to look at a pre-post test math score across low, medium, and high Socio-Economic Status (SES). The "number of groups" would be 3 (for the three levels of SES), and the "number of measurements" would be 2, for the two different tests given to each person (pre and post). As we're looking at the sample size to detect within-subject differences, our sample size given this input would be to tell the difference between pre and post test scores.

I had the same question, so I sent an e-mail to the G*Power team. They informed me that the current version of G*Power (3.1.9.2) cannot conveniently do power analyses for repeated measures designs with more than one within-subject or between-subject factor. It is possible using the "Generic F test" option, but this is considerably more complicated.

So the design with 2 within-subject factors in the original post is currently unsupported: The most complex design that is currently supported by the "ANOVA: repeated measures" option can have a maximum of one between-subject and one-within subject variable (i.e. the repeated measure). In that case:

• "Number of groups" is simply the number of levels in your between-subject factor. So say your design contains a factor "gender", the number of groups would be 2 (for male and female). If there is no between-subjects factor, you would enter 1.
• "Number of measurements" is simply the number of levels in your within-subject factor/repeated measure. So if you collected data at 4 different time points for example, the number of measurements would be 4.

The problem is that you cannot enter "1" in the "number of groups" window.

Therefore, seems it is not possible to use G*Power for RM ANOVAs with no between-subject factors.