Hello. I'm using proc corr and I want it to create 16 scatterplots. I know there is a limit to the number of scatterplots it will create, but I was also told that there is an option I can add to get all of the scatterplots. Can you help me? Here is my code:
ODS GRAPHICS ON; PROC CORR DATA=data PLOTS=(SCATTER MATRIX) PEARSON SPEARMAN VARDEF=DF ; VAR bfpwv_b cfpwv_b; WITH socstress_b hwss_ism hwss_ssm hwss_rsm hwss_fsm hwss_psm hwss_esm fossc_b; RUN; ODS GRAPHICS OFF;
That helped, thanks!!!
Hello @hein68,
Add the NWITH=ALL option:
PLOTS=(scatter(nwith=all) matrix(nwith=all))
Moreover, if the total number of data points in the scatter plot matrix exceeds 5000, you will need to add the MAXPOINTS=NONE option:
PLOTS(maxpoints=none)=(scatter(nwith=all) matrix(nwith=all))
That helped, thanks!!!
If the plots are all you are interested in you might also consider Proc SGSCATTER. The Compare statement allows similar list of x and y variables for the plots.
Or go whole hog and display regressions with the plots...
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.