Session Ready
Exercise

The subject variance

You will also need the error term of the repeated measures design. This can be calculated in a few steps.

  • First calculate the systematic variance due to subjects \(ss_s\).
  • In the next exercise, you will calculate the unsystematic variance \(ss_{sa}\), like you did with the between-groups design.
  • If you subtract these two results, you will get the error term of the repeated measures design \(ms_{rm}\).

The systematic (stable) subject variance will be taken out of the error term, so the error term is reduced in comparison with the between-groups design.

Instructions
100 XP
  • Define the number of conditions n for each subject. Calculate the subject means of IQ scores, y_j using the tapply() function.
  • You also need the grand mean y_t, so calculate this. Use the mean() function.
  • Now you have all the ingredients to calculate the subject sum of squares ss_subjects using the formula from the last slide.
  • Finally you can calculate the subject variance ms_subjects. Of course you need to define the degrees of freedom df first: df = # of subjects - 1.