BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Magdal3na
Fluorite | Level 6

Hello All,

Currently I'm doing Bland-Altman Plots for many variables so I'm using a macro. My problem is that sometimes the upper and lower limits are not included in the plot. SAS sets the y-Axis automatically, but does not include the reflines I'm defining in the sgplot procedure. My question now is: how can I force SAS to include the limits in every plot?

I already tried setting the yaxis min=lower and max=upper. However, some of the plots are cut off to early, not showing all the data points lying outside the confidence limits.

Setting the yaxis separately for every plot is not an option.

I want SAS to define the y-axis automatically as it usually does, while including not only all data points, but the upper and lower limits as well.

What statement could I use for gaining the desired plot?

I am thankful for any help and information. 

I'm using SAS 9.4 (TS1M2).

Kind regards,

Magdalena

 

Here is the sgplot part of my macro:

ods graphics / AttrPriority=None  width=11.35cm  height=8.49cm;
proc sgplot data=differs ; where Group='1';
styleattrs datasymbols=( Diamond) 
 datacontrastcolors=(Peru);
scatter x=mean y=diff/ group=abc;
refline &mean  /lineattrs=(color=green thickness=2px) ;
refline &upper &lower /lineattrs=(color=red );
run ; ods graphics off;
1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

Use NOCLIP option on the REFLINE statement.

View solution in original post

2 REPLIES 2
Jay54
Meteorite | Level 14

Use NOCLIP option on the REFLINE statement.

Magdal3na
Fluorite | Level 6

Thank you very much!

Somehow, yesterday I didn't find this statement Robot Embarassed

sas-innovate-white.png

Special offer for SAS Communities members

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.

 

View the full agenda.

Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 800 views
  • 1 like
  • 2 in conversation