/* Spearman Rank Correlation of Age and BMI*/

filename t01 url 'http://hedwig.mgh.harvard.edu/biostatistics/sites/default/files/public/education/tmp_sample_data.csv';

proc import file=t01 out=t01 dbms=csv replace;
run;

proc corr data=t01 nosimple spearman;
var age;
with bmi;
run;

/********************************** ANNOTATED RESULTS **********************************/

                             The CORR Procedure

                          1 With Variables:    bmi
                          1      Variables:    age


                   Spearman Correlation Coefficients, N = 60
                          Prob > |r| under H0: Rho=0

                                             age

                               bmi       0.58835a
                                          <.0001b
            
        
a Spearman correlation
b P-value indicating correlation is significantly different than zero