options nocenter; goptions colors=(none); /* Read in the dataset */ data table5; infile 'I:\.www\datasets502\example5-1.dat'; input indiv sbp age; /* Compute the correlation between variables either using 1. corr option in proc reg 2. proc corr The results from this output needs to manually be entered in order to compute the confidence interval and perform a hypothesis test. Notice below the input statement after data new and then the cards statement at the bottom. It is the numbers after the cards statement that you need to change. n = number of observations r = correlation estimate r0 = hypothesized value for the correlation alpha = significance level for a two sided test = 1-confidence level for the interval */ proc reg corr; model sbp=age; proc corr; var sbp age; data new ; input r r0 n alpha; fr=.5*log((1+r)/(1-r)); fr0=.5*log((1+r0)/(1-r0)); z_alpha = probit(1-alpha/2); L_Z = fr - z_alpha*sqrt(1/(n-3)); U_Z = fr + z_alpha*sqrt(1/(n-3)); L_p = (exp(2*L_Z)-1)/(exp(2*L_Z)+1); U_p = (exp(2*U_Z)-1)/(exp(2*U_Z)+1); Z = (fr - fr0)*sqrt(n-3); pvalue = 2*probnorm(-abs(Z)); cards; .65757 .85 30 .05 ; proc print; var alpha pvalue L_p U_p; run;