I'm testing the effect of four different altitudes (0m, 1000m, 2000m and 3000m) on repeated sprint performance (6 sprints at each altitude). I have 8 test subjects who will be tested at each altitude. That means I'm getting 8x4x6=192 sets of data. What I want to investigate is the difference in performance at the 4 different altitudes and wether or not there actually IS a difference. How do I best represent this and what would be the relevant statistical tests to run? To me it is a bit confusing since I have multiple conditions, and I want to compare each condition with the other conditions (but I'm not sure about the best way to do this).

Thanks in advance for your help. Let me know if I can clarify.


You need repeated measures analysis. You need one variable for the subject (lets say “subject” with values 1 to 8) one more variable to express the altitude (lets say “altitude” with values 0, 1, 2, 3) and one per sprint repeat (lets say “sprint1”, “sprint2”, ..., “sprint6”).

So, your data will have 8 variables with 32 values each (8 subjects to 4 different altitudes). Now, it is a nice idea to type in the data in Excel or Calc in the above format and save in a separate file (8 columns and 32 rows).

For the statistical analysis: In case you are using SPSS then you need to copy and paste the data from Excel or Calc to SPSS and use the procedure provided in Analyze → General Linear Model → Repeated Measure. You may find many nice tutorials in the web.

In case you are using R project then first type in your data using the following commands

subject = as.factor(c(1, 1, 1, 1, 2, 2, 2, 2, ….. , 8, 8, 8, 8))
altitude = as.factor(c(0, 1, 2, 3, 0, 1, 2, 3,  ….. ,0, 1, 2, 3))
sprint1 = c(time 1 for subject 1 and altitude 0,  …., time 1 for subject 8 and altitude 3)
sprint6 = c(time 6 for subject 1 and altitude 0,  …., time 6 for subject 8 and altitude 3)

dataF = data.frame(subject, altitude, sprint1, sprint2, sprint3, sprint4, sprint5, sprint6)

Then, define the time factor

time = factor(rep("sprint_time_measurement", 6), levels=c("sprint1", "sprint2", "sprint3", "sprint4", "sprint5", "sprint6"))
time[1] = "sprint1"; time[2] = "sprint2"; time[3] = "sprint3";time[4] = "sprint4";time[5] = "sprint5";time[6] = "sprint6"
idata <- data.frame(time)

And, finally run the analysis with the following commands

mod.ok <- lm(cbind(sprint1, sprint2, sprint3, sprint4, sprint5, sprint6) ~  subject * altitude, data=dataF)
(av.ok <- Anova(mod.ok, idata=idata, idesign=~time, type = "III")) 
summary(av.ok, multivariate=FALSE)

Normally, the above will provide the necessary output for you. The type = "III" option is not necessary, keep it if you need to have similar to the default SPSS output (however keep in mind that this is not necessarily the correct choice)

The first thing you will look is for the interaction between the three factors (time, subject, altitude). If not significant interaction appear then look to the partial interactions between each two factors and if no significant interactions appear then look into the effects of each factor separately.

If interaction is significant then the rest analysis is a little bit complicated. For SPSS you should use the syntax editor (the procedure described here) while for R, I would suggest (with some caution since I never did that) the lmdme (other suggestions are welcome!)

Hope the above will help you.

  • $\begingroup$ Thank you for an awesome answer. Would it change anything if some of the test subjects only completed part of the study? (for example only 1000 and 3000 meters). In that case should I include them, and just have a different number of participants for each altitude? $\endgroup$ – JacobJuul May 16 '14 at 12:36
  • $\begingroup$ If you have one missing value at one of the variables then this case is entirely out for this analysis (listwise deleted), and the power of the result is decreasing. If you believe that you can replace one missing value with some other reasonable number (an option would be to find the mean difference for the other subjects between altitudes and calculate the analogous score for the subject with the missing value) then do that. However, if you have many missing values this is not a right thing to do and you may restrict your analysis to the variables with no missing values. $\endgroup$ – Epaminondas May 16 '14 at 18:20

The most common method would be to do a repeated measures analysis of variance (ANOVA).

ANOVA + follow-up using repeated measures design with a modification


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.