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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 349 views
  • 0 likes
  • 2 in conversation