title 'Psychology 7291: Within Subjects Design: Alzheimer example'; title2 'Plot of the means for the different groups'; proc format; value drugfmt 1=' 0 mg' 2=' 5 mg' 3='10 mg'; value catfmt 1='R_N_RL' 2='C_N_RL' 3='R_O_RL' 4='C_O_RL' 5='R_N_RG' 6='C_N_RG' 7='R_O_RG' 8='C_O_RG'; data means; input obs score drug type freq memory; label memory='Memory Score'; format drug drugfmt. score catfmt.; cards; 13 1 1 3 10 55.400 14 1 2 3 10 65.700 15 1 3 3 10 78.200 16 2 1 3 10 65.400 17 2 2 3 10 72.900 18 2 3 3 10 85.800 19 3 1 3 10 61.600 20 3 2 3 10 65.500 21 3 3 3 10 75.200 22 4 1 3 10 77.300 23 4 2 3 10 78.000 24 4 3 3 10 87.700 25 5 1 3 10 74.100 26 5 2 3 10 78.400 27 5 3 3 10 95.200 28 6 1 3 10 84.800 29 6 2 3 10 86.800 30 6 3 3 10 105.100 31 7 1 3 10 77.500 32 7 2 3 10 81.100 33 7 3 3 10 91.600 34 8 1 3 10 91.100 35 8 2 3 10 91.400 36 8 3 3 10 101.500 ; symbol1 c=black l=1 w=3 v=star h=2 i=join; symbol2 c=black l=2 w=3 v=circle h=2 i=join; symbol3 c=black l=3 w=3 v=square h=2 i=join; title 'Means of the Alzheimers Repeated Measure Problem'; proc gplot; plot memory*score=drug; run;