Suppose I wish to assess reaction time of individuals before and after treatment, using R code.
Now to analyse the results if I had additional treatments, I could use repeated measurements ANOVA in R, using the aov() function. These approaches however assume that there is only one measurement of reaction time per person, per treatment.
However suppose that for each individual, we measure their reaction time 5 times before treatment and 5 times after treatment. How should I adjust the t-test or repeated measurements ANOVA to account for this?
I know I could simply average prior to analysis, but is it also possible to include all the 5 trials in the analysis in R and if so how ?
Note the data might look something like this:
Subject Treatment Time Result Subj1 Coke Morning 15 Subj1 Coke Morning 14 Subj1 Water Morning 17 Subj1 Water Morning 20 Subj2 Coke Morning 45 Subj2 Coke Morning 46 Subj2 Water Morning 58 Subj2 Water Morning 75