This example, which is a continuation of Example 4.9, illustrates how to carry out three tests for location: the Student’s t test, the sign test, and the Wilcoxon signed rank test. These tests are discussed in the section Tests for Location.
The following statements demonstrate the tests for location by using the Heights
data set introduced in Example 4.9. Because the data consists of adult female heights, the researchers are not interested in testing whether the mean of the
population is equal to zero inches, which is the default value. Instead, they are interested in testing whether the mean is equal to 66 inches. The following statements test the
null hypothesis :
title 'Analysis of Female Height Data'; ods select TestsForLocation LocationCounts; proc univariate data=Heights mu0=66 loccount; var Height; run;
The ODS SELECT statement restricts the output to the "TestsForLocation" and "LocationCounts" tables; see the section ODS Table Names. The MU0= option specifies the null hypothesis value of for the tests for location; by default, . The LOCCOUNT option produces the table of the number of observations greater than, not equal to, and less than 66 inches.
Output 4.12.1 contains the results of the tests for location. All three tests are highly significant, causing the researchers to reject the hypothesis that the mean is 66 inches.
A sample program for this example, uniex07.sas, is available in the SAS Sample Library for Base SAS software.
Output 4.12.1: Tests for Location with MU0=66 and LOCCOUNT