/****************************************************************/ /* S A S S A M P L E L I B R A R Y */ /* */ /* NAME: hpred04.sas */ /* TITLE: Example 4 for PROC HPREDUCE */ /* Unsupervised variable selection */ /* Output correlation matrix */ /* Correlation matrix in LIL format */ /* PRODUCT: HPA */ /* SYSTEM: ALL */ /* KEYS: Variable Selection, */ /* Unsupervised */ /* Correlation matrix */ /* LIL format */ /* PROCS: HPREDUCE */ /* DATA: */ /* */ /* SUPPORT: Z. Alan Zhao */ /* REF: SAS/HPA User's Guide, PROC HPREDUCE chapter */ /* MISC: */ /* */ /****************************************************************/ data one; array x{2}; do i=1 to 2000; a=int(ranuni(1)*2); do j=1 to 2; x{j}=ranuni(1); end; output; end; run; title "Output the Correlation Matrix in LIL format"; proc hpreduce data=one corr outcp=corr_lil/list(eps=0.01); class a; reduce unsupervised a x1-x2 /maxsteps=4; run; proc print data=corr_lil; run;