The UNIVARIATE Procedure

# Example 4: Performing a Sign Test Using Paired Data

Procedure features:
PROC UNIVARIATE statement option:
 ALPHA= CIBASIC CIPCTLDF LOCCOUNT MODES
Other features:
 LABEL statement

This example

• computes difference scores for paired data

• lists all values of the mode

• examines the tests for location to determine if the median difference between scores is zero

• lists the number of observations less than, greater than, and equal to zero

• specifies the confidence levels for the confidence limits

• generates distribution-free confidence limits for the quantiles.

`options nodate pageno=1 linesize=80 pagesize=60;`
 ```data score; input Student \$ Test1 Test2 Final @@; ScoreChange=test2-test1; datalines; Capalleti 94 91 87 Dubose 51 65 91 Engles 95 97 97 Grant 63 75 80 Krupski 80 75 71 Lundsford 92 55 86 Mcbane 75 78 72 Mullen 89 82 93 Nguyen 79 76 80 Patel 71 77 83 Si 75 70 73 Tanaka 87 73 76 ;```
 ```proc univariate data=score loccount modes alpha=.01 cibasic(alpha=.05) cipctldf;```
 ` var scorechange;`
 ``` label scorechange='Change in Test Scores'; title 'Test Scores for a College Course'; run;```

 PROC UNIVARIATE includes the variable label in the report. The report also provides a message to indicate that the lowest mode is shown in the Basic Statistical Measures table. The Modes table reports all the mode values. The mean of -3.08 indicates an average decrease in test scores from Test1 to Test2. The 95 percent confidence limits (-11.56, 5.39), which includes 0, and the tests for location indicate that the decrease is not statistically significant. The Tests for Location table includes three hypothesis tests. The Student's t statistic assumes that the data are approximately normally distributed. The sign test and signed rank test are nonparametric tests. The signed rank test requires a symmetric distribution. If the distribution is symmetric you expect a skewness value that is close to zero. Because the value -1.42 indicates some distribution skewness, examine the sign test to determine if the difference in test scores is zero. The large p-value (.7744) provides insufficient evidence of a difference in test score medians. Because PROC UNIVARIATE computes a symmetric confidence interval, some coverages for the confidence limits are less than 99 percent. In some cases, there are also insufficient data to compute a symmetric confidence interval, and a missing value is shown. Use the TYPE=ASYMMETRIC option to increase the coverage and reduce the number of missing confidence limits.