Save p-values for Pearson, Spearman, or other correlations in a data set


Use an ODS OUTPUT statement and the appropriate table name (PearsonCorr, SpearmanCorr, KendallCorr, or HoeffdingCorr) to create an output data set that contains the p-values. For example, the following statements create data set B, which contains the table of Pearson correlations including the associated p-values:

ods output PearsonCorr=B;

proc corr;

var x1-x4;

run;