BookmarkSubscribeRSS Feed
josuerodrigues
Calcite | Level 5

Hello, I have a doubt.

I wanna do a Scatter Plot Matrix. I have 13 variables, but in the results just apper 5 variables in the Scatter Plot Matrix. What can I do for the results appear all variables?

 

My line program that I'm using is:

proc corr data=phd plots=matrix(histogram);
var P MO pH K Ca Mg Na HAl Al SB CTC V m;
run;

3 REPLIES 3
ballardw
Super User

The online help for the Proc Corr  plots statement has this bit :

If the resulting maximum number of variables in the VAR or WITH list is greater than 10, only the first 10 variables in the list are displayed in the scatter plot matrix.

The available scatter-options are as follows:

That means the maximum default is a 5 by 5 matrix (5 VAR and 5 With variables) If you don't provide a WITH then the first 5 Var variables repeat in both roles.

 

You can override that specifying a number or the value ALL with the NVAR= option for the plot.

proc corr data=phd plots=matrix(histogram nvar=all);
var P MO pH K Ca Mg Na HAl Al SB CTC V m;
run;

there are separate NVAR and NWITH options. Too many variables may not fit and would require multiple calls to Proc Corr with different variables.

Consider your use as well. You may want to consider use of WITH so the variables on the VAR statement are compared with the WITH . I might guess from your variable names that K Ca mg na al and sb have something in common (elements IIRC). So perhaps your research question wants to compar P Mo ph CTC V and m with those?

 

 

 

PaigeMiller
Diamond | Level 26

adding to the answer above by @ballardw 

 

A 13x13 scatterplot matrix will have cells so small that it will be difficult to read. That is a good reason for SAS to set the default at 5. You might want to re-think what the desired output should be.

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 427 views
  • 5 likes
  • 4 in conversation