SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
pspung
Fluorite | Level 6

Hi folks, is it possible to turn on some kind of graph annotation option to show the NN% CL Mean or NN% CL Std Dev values on the summary panel produced by proc ttest? The variable has a pretty wide range of values. The shading alone that shows the upper and lower CL Mean values (for example; see the green shading in the screenshot) in the box plot is quite narrow, and so it's difficult to discern those values. Obviously I can get them in the output/listing window and then mark up the output graph, but that adds a task and another tool that I'd rather have SAS do for me using proc ttest or ods graphics options.

 

pspung_0-1635195998539.png

I did look through the myriad of options on both ttest and ods graphics, but nothing jumped out. If it is also possible to turn on annotations for other marks on the histogram or the box blot, that'd be great to know.

Thanks for any suggestions, Peter

2 REPLIES 2
ballardw
Super User

Without seeing your current code and possibly data may not be able to answer.

 

Typically for most of the plots created by analysis procedures like Ttest if the option doesn't show up quickly the approach is usually to create output data sets from the procedure, select the needed data and use one of Proc Sgplot or Sgpanel.

 

Which is why sharing at least the code may help to identify which table(s) you may need to generate to send to Sgplot.

Note that the data actually used by the plot(s) can be sent to data sets as well as table results.

 

 

 

pspung
Fluorite | Level 6

Hi ballardw, thanks for you response.  Here is the code:

ods graphics on / imagename='hp-90ci-ttest' width=8in;
proc ttest data=mp2.cars alpha=0.1;
  var horsepower;
run;
ods graphics off;

You can replace the dataset with sashelp.cars and see the same lack of annotation with values for the summary stats in the summary panel on both the histogram and the box plot. Here is what SAS generates when doing so:

pspung_0-1635205827249.png

It's really difficult to see where the green shading begins and ends with any precision, or the other marks on the box plot or histogram. The readers of the report this will go in are not familiar with SAS output, so I'd like to add some text annotations.   Thanks, Peter

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
  • 735 views
  • 0 likes
  • 2 in conversation