|
Chapter Contents |
Previous |
Next |
| The TTEST Procedure |
This example examines children's reading skills. The data consist of Degree of Reading Power (DRP) test scores from 44 third-grade children and are taken from Moore (1995, p. 337). Their scores are given in the following DATA step.
title 'One-Mean Comparison Using FREQ Statement';
data read;
input score count @@;
datalines;
40 2 47 2 52 2 26 1 19 2
25 2 35 4 39 1 26 1 48 1
14 2 22 1 42 1 34 2 33 2
18 1 15 1 29 1 41 2 44 1
51 1 43 1 27 2 46 2 28 1
49 1 31 1 28 1 54 1 45 1
;
run;
The following statements invoke the TTEST procedure to test if the mean test score is equal to 30. The count variable contains the frequency of occurrence of each test score; this is specified in the FREQ statement.
proc ttest data=read h0=30;
var score;
freq count;
run;
The output, shown in Output 67.2.1, contains the results.
Output 67.2.1: TTEST ResultsThe SAS log states that 30 observations and two variables have been read. However, the sample size given in the TTEST output is N=44. This is due to specifying the count variable in the FREQ statement. The test is significant (t=2.87, p=0.0063) at the 5% level, thus you can conclude that the mean test score is different from 30.
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.