### SAS FAQ  How do I test on Pearson correlation using Fisher's Z transformation in SAS 9.x?

One new feature that Proc corr of SAS 9.1 offers is Fisher's Z transformation to compare correlations. This makes performing hypothesis test on Pearson correlation coefficients much easier. The only thing that one has to do is to add option fisher to the proc corr statement.

Example 1. Testing on correlation = 0.

proc corr data = hsb2 fisher;
var write math;
run;
   2  Variables:    write    math

Simple Statistics

Variable           N          Mean       Std Dev           Sum       Minimum       Maximum

write            200      52.77500       9.47859         10555      31.00000      67.00000
math             200      52.64500       9.36845         10529      33.00000      75.00000

Pearson Correlation Coefficients, N = 200
Prob > |r| under H0: Rho=0

write          math

write       1.00000       0.61745
<.0001

math        0.61745       1.00000
<.0001

Pearson Correlation Statistics (Fisher's z Transformation)

With                         Sample                        Bias    Correlation
Variable    Variable           N    Correlation    Fisher's z    Adjustment       Estimate

write       math             200        0.61745       0.72087       0.00155        0.61649

Pearson Correlation Statistics (Fisher's z Transformation)

With                                     p Value for
Variable    Variable       95% Confidence Limits        H0:Rho=0

write       math            0.522432      0.695723        <.0001

Example 2. Testing on correlation = specific value.

proc corr data = hsb2 fisher (rho0=.2) nosimple;
var write math;
run;
   2  Variables:    WRITE    MATH

Pearson Correlation Coefficients, N = 200
Prob > |r| under H0: Rho=0
                      WRITE          MATH
WRITE               1.00000       0.61745
writing score                      <.0001
MATH                0.61745       1.00000
math score           <.0001

                Pearson Correlation Statistics (Fisher's z Transformation)
            With                         Sample                        Bias    Correlation
Variable    Variable           N    Correlation    Fisher's z    Adjustment       Estimate
WRITE       MATH             200        0.61745       0.72087       0.00155        0.61649
        Pearson Correlation Statistics (Fisher's z Transformation)
            With                                     ------H0:Rho=Rho0-----
Variable    Variable       95% Confidence Limits           Rho0     p Value
WRITE       MATH            0.522432      0.695723      0.20000      <.0001

The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.