This example combines sample correlation coefficients that are computed from a set of imputed data sets by using Fisher’s z transformation.
Fisher’s z transformation of the sample correlation r is
The statistic z is approximately normally distributed, with mean
and variance , where is the population correlation coefficient and n is the number of observations.
The following statements use the CORR procedure to compute the correlation r and its associated Fisher’s z statistic between the variables Oxygen
and RunTime
for each imputed data set. The ODS statement is used to save Fisher’s z statistic in an output data set.
proc corr data=outmi fisher(biasadj=no); var Oxygen RunTime; by _Imputation_; ods output FisherPearsonCorr= outz; run;
The following statements display the number of observations and Fisher’s z statistic for each imputed data set in Output 64.11.1:
proc print data=outz; title 'Fisher''s Correlation Statistics'; var _Imputation_ NObs ZVal; run;
The following statements generate the standard error associated with the z statistic, :
data outz; set outz; StdZ= 1. / sqrt(NObs-3); run;
The following statements use the MIANALYZE procedure to generate a combined parameter estimate and its variance, as shown in Output 64.11.2. The ODS statement is used to save the parameter estimates in an output data set.
proc mianalyze data=outz; ods output ParameterEstimates=parms; modeleffects ZVal; stderr StdZ; run;
In addition to the estimate for z, PROC MIANALYZE also generates 95% confidence limits for z, and . The following statements print the estimate and 95% confidence limits for z in Output 64.11.3:
proc print data=parms; title 'Parameter Estimates with 95% Confidence Limits'; var Estimate LCLMean UCLMean; run;
An estimate of the correlation coefficient with its corresponding 95% confidence limits is then generated from the following inverse transformation as described in the section Correlation Coefficients:
for , , and .
The following statements generate and display an estimate of the correlation coefficient and its 95% confidence limits, as shown in Output 64.11.4:
data corr_ci; set parms; r= tanh( Estimate); r_lower= tanh( LCLMean); r_upper= tanh( UCLMean); run; proc print data=corr_ci; title 'Estimated Correlation Coefficient' ' with 95% Confidence Limits'; var r r_lower r_upper; run;