Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Correlation Matrix Plot Not Plotting All Variables

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 16
Accepted Solution

Correlation Matrix Plot Not Plotting All Variables

Hi,

 

I am trying to make correlation matrix plots using 6 variables: height, weight, age,  and the ultrasound measures stiffness index, bua, and sos. For some reason, I can't get the plot to include all the variables - it cuts off the last one, "Insightsos". Can you tell me what I can do to get SAS to plot all these variables in the matrix? I'm using SAS 9.4 M4 for Windows 7 64bit.

 

Thanks,

Cara

 

ods graphics on;
proc corr data=achilles_m nomiss plots=matrix(histogram) plots(maxpoints=none);  
	by winbonevisit;
	where insight=1;
	var Height Weight1 Age Insightstiff Insightbua Insightsos;
	format winbonevisit winbonevisitf.;
run;
ods graphics off;

MatrixPlot11.png


Accepted Solutions
Solution
‎12-15-2017 11:21 AM
SAS Super FREQ
Posts: 508

Re: Correlation Matrix Plot Not Plotting All Variables

From the documentation:

 

NVAR=ALL | n

specifies the maximum number of variables in the VAR list to be displayed in the matrix plot, where $n > 0$. The NVAR=ALL option uses all variables in the VAR list. By default, NVAR=5.

 

View solution in original post


All Replies
Solution
‎12-15-2017 11:21 AM
SAS Super FREQ
Posts: 508

Re: Correlation Matrix Plot Not Plotting All Variables

From the documentation:

 

NVAR=ALL | n

specifies the maximum number of variables in the VAR list to be displayed in the matrix plot, where $n > 0$. The NVAR=ALL option uses all variables in the VAR list. By default, NVAR=5.

 

Occasional Contributor
Posts: 16

Re: Correlation Matrix Plot Not Plotting All Variables

Posted in reply to WarrenKuhfeld

This worked, thank you!

Super User
Posts: 13,926

Re: Correlation Matrix Plot Not Plotting All Variables

Possible causes without seeing the data:

The variable is not numeric. check with Proc Contents or anything that displays column/ variable properties.

The variable is missing for all the records where insight=1 for one or more levels of the By variable.

 

One check would be Proc freq with insight*Insightsos on the tables statement with an identical By statement.

 

Insufficient space in the graphics area. You can test this by setting width and height options on the ODS Graphics to values such as

ods graphics on / width=10in height=10in;

to use a 10 inch by 10 inch display.

 

Do you get any tabular output for that variable?

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 392 views
  • 2 likes
  • 3 in conversation