60 TESTS FOR CATEGORICAL DATA
For
α
= 0.01 and n = 9, a one-sided critical value is equal to 0.783. The value of
r
s
is larger than the critical value, therefore, the null hypothesis is rejected, and the
conclusion is that there is a significant positive correlation present.
We arrive at the same conclusion after running these lines of code in SAS:
proc freq data=glaucoma;
table Tx*Cx;
exact scorr;
run;
The output is:
Spearman Correlation Coefficient
Correlation (r) 0.8333
Exact Test
One-sided Pr >= r 0.0041
Alternatively, the CORR procedure may be run to obtain an approximate P-value.
The code is
proc corr data=glaucoma spearman;
var Tx Cx;
run;
The results are
Spearman Correlation Coefficients, N = 9
Prob > |r| under H0: Rho=0
Tx Cx
Tx 1.00000 0.83333
0.0053
Cx 0.83333 ...