# [R] very simple repeated measures, newbie questions

Jonathan Baron baron at cattell.psych.upenn.edu
Sun Mar 26 14:31:20 CEST 2000

```Suppose I do a psychology experiment in which each of six
subjects does several items in each of five fixed conditions, A,
B, C, D, and E.  The items are randomized separately for each
subject, so I can ignore order.  All I want to know is whether
the five conditions differ.  The data look like this.  Each row
is a subject, and each number is the score in the given
condition.

A  B  C  D  E
4  1  5 10 10
9  2 10  7  7
6  3  7  8  8
7  4  9  8  9
6  3  7  8  9
3  2  5  7  7

Question 1:  This is the simplest possible repeated measures
design.  It should yield F(4,24)=16.033 for the effect of
condition.  (The example is from the Systat manual, slightly
changed.)  How do I show this with R?

Question 2:  I would like a graph in which each line is a
subject, and the abscissa is labeled A B C D E.  Thus, one line
would connect the points 4 1 5 10 10.  Another would connect 9 2
10 7 7, and so on.  (Systat calls this a parallel plot, and I
have come to find it very useful for a first look at data.)  Can
this be done in R?

Jonathan Baron, Professor of Psychology, University of Pennsylvania