- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi all.
I created a boxplot using SGPLOT:
proc sgplot data=Sample;
vbox CDRSUM / connect=median category=NACCFDYSYear group=cases_A__control_B;
run;
I want to add the number of available observations for each year to the bars.
Does anyone know how to do this?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
What do you mean by 'available observations'?
Where should the number appear? Inside the bar? The number will be pretty small.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It is always a good idea to discuss items in terms of the VARIABLE names. We really do not know anything that tells us "observations for each year" or which variable actually is a year.
I guess you may be asking about the number of observations for NACCFDYSYear.
Also, where you want it the values to appear can make a big difference in approach.
If placing the value near the Xaxis is appropriate then perhaps:
xaxistable NACCFDYSYear /stat=freq;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for helping me. I tried xaxistable and recieved the following:
WARNING: The AXISTABLE supports only SUM and MEAN statistics when a bar
chart, line chart, or dot plot is not used. The SUM statistic will
be used by default.
So freq cannot be used with a box plot
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The AXISTABLE cannot give frequencies for a box plot. Any other suggestions? Thanks