within-subjects analyses, averaging timepoints

This code does the within-subjects analyses, but not the permutation
tests.