Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ods excel file='/home/u63376027/Export/Correlation_Heatmap.xlsx' style=seaside;
- proc template;
- delete Base.Corr.StackedMatrix / store=sasuser.templat;
- edit Base.Corr.StackedMatrix;
- column (RowName RowLabel) (Matrix);
- header 'Pearson Correlation Coefficients';
- edit matrix;
- format=5.2;
- cellstyle
- _val_ <= -1 as {backgroundcolor=CXFF0000},
- _val_ <= -0.75 as {backgroundcolor=CXFF007D},
- _val_ <= -0.5 as {backgroundcolor=CXFF00FA},
- _val_ <= -0.25 as {backgroundcolor=CX7D82FF},
- _val_ <= 0 as {backgroundcolor=CX00FFFF},
- _val_ <= 0.25 as {backgroundcolor=CX7D82FF},
- _val_ <= 0.5 as {backgroundcolor=CXFF00FA},
- _val_ <= 0.75 as {backgroundcolor=CXFF007D},
- _val_ <= 1 as {backgroundcolor=CXFF0000};
- 12
- end;
- end;
- quit;
- ods pdf style=sapphire;
- options nolabel;
- proc corr data=STPSAMP.STPEURO(drop=id:) noprob; /* data set */
- ods select PearsonCorr;
- run;
- %paint(values=-1 to 1 by 0.25, macro=setstyle, colors=red magenta cyan magenta red)
- proc template;
- delete Base.Corr.StackedMatrix / store=sasuser.templat;
- edit Base.Corr.StackedMatrix;
- column (RowName RowLabel) (Matrix);
- header 'Pearson Correlation Coefficients';
- edit matrix;
- format=5.2;
- %setstyle(backgroundcolor)
- end;
- end;
- quit;
- proc corr data=STPSAMP.STPEURO(drop=id:) noprob; /* data set */
- ods select PearsonCorr;
- run;
- ods excel close;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement