BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kcodo
Obsidian | Level 7
proc corr nomiss spearman data=WORK.smuck_6MWT PLOTS=MATRIX;
var   PF VT	MH	SF	BP	GH;
with KOOS_PainN; nwith=all;
 run; quit;

I got this error message 

ERROR 180-322: Statement is not valid or it is used out of proper order

 

where is the correct place to put nwith=all

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

You can use options NVAR=ALL | n and NWITH=ALL | n in the plots=matrix(<options>) request to override the maximum of 5 variables per panel.

PG

View solution in original post

5 REPLIES 5
Astounding
PROC Star

nwith= is part of the plotting options:

 

proc corr ..... plots=matrix(nwith=all);

kcodo
Obsidian | Level 7
proc corr nomiss spearman data=WORK.smuck_6MWT PLOTS=MATRIX;
var   PF VT	MH	SF	BP	GH;
with KOOS_Pain; run; quit;

how do i modify this code to display the matrix plot for more than 5 variables. there is no matrix plot with the above code for var (GH)

art297
Opal | Level 21

The default maximum number of plots is 5. You want to add the nvar option. i.e.:

proc corr nomiss spearman data=WORK.smuck_6MWT PLOTS=MATRIX (NVAR=all);
var   PF VT	MH	SF	BP	GH;
with KOOS_Pain; run; quit;

Art, CEO, AnalystFinder.com

 

 

PGStats
Opal | Level 21

You can use options NVAR=ALL | n and NWITH=ALL | n in the plots=matrix(<options>) request to override the maximum of 5 variables per panel.

PG
Reeza
Super User

My apologies, I accidentally merged these two posts because the topic was the same and the code, from a quick scan, looked the same.  

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1365 views
  • 2 likes
  • 5 in conversation