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.  

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

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
  • 2733 views
  • 2 likes
  • 5 in conversation