We are very grateful to Professor Geoffrey Keppel for granting us permission to distribute the example data files used in Design & Analysis.
This page shows the data files used in the SAS Textbook Examples for Design & Analysis
You can mark the program that reads the data, and then choose Edit then Copy within your web browser. You can then choose Edit then Paste to paste the program into your SAS Program.
Chapter 2
CHAP2. This data file is from Table 2-1 in Chapter 2. Variable A has three levels, representing three different instruction techniques, and the outcome is the students comprehension score.
DATA chap2; input a score; cards; 1 16 1 18 1 10 1 12 1 19 2 4 2 6 2 8 2 10 2 2 3 2 3 10 3 9 3 13 3 11 ; run;
Chapter 3
CHAP3. This data file is from Table 3-4 in Chapter 3. Variable A has four levels, representing the level of sleep deprivation. The outcome was the number of errors in a vigilance task.
DATA chap3; input a failures; cards; 1 37 1 22 1 22 1 25 2 36 2 45 2 47 2 23 3 43 3 75 3 66 3 46 4 76 4 66 4 43 4 62 ; run;
Chapter 7
CHAP7. This data file based on the values from Table 7-1 in Chapter 7. This data has properties consistent with the table and can be used to replicate the analyses shown in Keppel. Variable A has four levels, representing the level of inter-trial interval between trials. The outcome was the number of correct answers.
DATA chap7; input id a numcorr; cards; 1 1 7 2 1 9 3 1 9 4 1 9 5 1 9 6 1 11 7 1 12 8 1 12 9 1 14 10 1 14 11 1 13 12 1 18 13 1 18 14 1 20 15 1 20 16 1 20 17 1 21 18 1 22 19 1 22 20 1 24 21 2 13 22 2 18 23 2 12 24 2 17 25 2 16 26 2 20 27 2 21 28 2 22 29 2 22 30 2 22 31 2 25 32 2 25 33 2 21 34 2 23 35 2 25 36 2 24 37 2 22 38 2 26 39 2 27 40 2 26 41 3 19 42 3 20 43 3 19 44 3 19 45 3 19 46 3 20 47 3 21 48 3 22 49 3 23 50 3 23 51 3 25 52 3 22 53 3 24 54 3 24 55 3 25 56 3 25 57 3 26 58 3 26 59 3 26 60 3 28 61 4 13 62 4 12 63 4 14 64 4 11 65 4 16 66 4 17 67 4 17 68 4 18 69 4 22 70 4 21 71 4 19 72 4 23 73 4 23 74 4 23 75 4 24 76 4 24 77 4 25 78 4 25 79 4 29 80 4 25 ; run;
Chapter 10
CHAP10. This data file is from Table 10-6 in Chapter 10. Variable A has 3 levels, where 1 is the control group, 2 is drug X and 3 is drug Y. Variable B is amount of time where 1 is 1 hr and 2 is 24 hours. The dependent variable is errors.
data chap10; input a b errors; cards; 1 1 1 1 1 4 1 1 0 1 1 7 2 1 13 2 1 5 2 1 7 2 1 15 3 1 9 3 1 16 3 1 18 3 1 13 1 2 15 1 2 6 1 2 10 1 2 13 2 2 6 2 2 18 2 2 9 2 2 15 3 2 14 3 2 7 3 2 6 3 2 13 ; run;
Chapter 12
CHAP12. This data file was derived from Table 12-6 from chapter 12. Keppel provides summary data, but not the individual raw data, for this example. This is a data file that closely conforms to the results illustrated by Keppel. The results using this data file will not be exactly the same as those shown in Keppel, but they will be very close.
Variable A is 3 levels of treatment, 1 is control, 2 is positive, and 3 is negative. B is a second independent variable and has 3 levlels, 1 = low F & low E, 2 = High F & Low E, 3 = High F & High E . The dependent variable is the memory score.
data chap12; input s a b memory; cards; 1 1 1 8.6 2 1 1 9.4 3 1 1 6.1 4 1 1 8.8 5 1 1 9.1 6 1 2 9.0 7 1 2 9.8 8 1 2 6.5 9 1 2 9.2 10 1 2 9.5 11 1 3 8.2 12 1 3 9.0 13 1 3 5.7 14 1 3 8.4 15 1 3 8.7 16 2 1 8.0 17 2 1 8.8 18 2 1 5.5 19 2 1 8.2 20 2 1 8.5 21 2 2 8.2 22 2 2 9.0 23 2 2 5.7 24 2 2 8.4 25 2 2 8.7 26 2 3 4.6 27 2 3 5.4 28 2 3 2.1 29 2 3 4.8 30 2 3 5.1 31 3 1 8.2 32 3 1 9.0 33 3 1 5.7 34 3 1 8.4 35 3 1 8.7 36 3 2 7.8 37 3 2 8.6 38 3 2 5.3 39 3 2 8.0 40 3 2 8.3 41 3 3 4.0 42 3 3 4.8 43 3 3 1.5 44 3 3 4.2 45 3 3 4.5 ; RUN;
Chapter 16
CHAP16W. This is the wide version of the data file is from Table 16-3 from chapter 16. Subjects receive 3 different treatments, and score1 is score under treatment 1, score2 is the score under treatment 2, and score3 is the score under treatment 3.
DATA chap16w; INPUT s score1 score2 score3; CARDS; 1 8 12 9 2 8 13 14 3 9 15 6 4 0 18 12 5 13 15 18 6 10 17 7 ; RUN;
CHAP16N. This is the narrow version of the data file is from Table 16-3 from chapter 16. The variable s is the subject number, a is the treatment number (1 2 or 3), p is the position ( 1st trial, 2nd trial, 3rd trial), and score is the score for the subject under the given treatment.
DATA chap16n; INPUT s a p score; CARDS; 1 1 1 8 1 2 2 12 1 3 3 9 2 1 3 8 2 2 1 13 2 3 2 14 3 1 2 9 3 2 3 15 3 3 1 6 4 1 1 0 4 2 3 18 4 3 2 12 5 1 2 13 5 2 1 15 5 3 3 18 6 1 3 10 6 2 2 17 6 3 1 7 ; RUN;
We are very grateful to Professor Geoffrey Keppel for granting us permission to distribute the example data files used in Design & Analysis.