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

I have ran a proc NPAR1WAY procedure on my dataset and have successfully got the graph that depicts the frequencies above and below the overall median BUT my problem is that I can't see how many are above and how many are below the median...that is the numbers I also need but don't know how to code for the results section to specify them...

1 ACCEPTED SOLUTION

Accepted Solutions
Watts
SAS Employee

This output data set (save)

ods output medianplot=save;

includes the frequencies above and below the median for each class.

proc print data=save;

View solution in original post

5 REPLIES 5
Watts
SAS Employee

You can save the median plot data (which includes the frequencies above and below the median) in a SAS data set like this:

ods graphics on;
proc npar1way data=have median;
     class classVar;  var analysisVar;
     ods output medianplot=save;
run;

Also, here's an example from the documentation (Statistical Graphics with ODS) that shows how to create plots in HTML that are enhanced with tooltip displays: 

Creating Graphs with Tooltips in HTML.

Yughaber
Quartz | Level 8
But that still doesn't show me how many counts are above the median and how many below...
Yughaber
Quartz | Level 8

Yughaber_0-1617392105509.png

you see the pink and the blue...they are the above and below median...I need to know the frequency for each color...I only have the N which for example for the first bar is 270 but I want to know the breakdown

Watts
SAS Employee

This output data set (save)

ods output medianplot=save;

includes the frequencies above and below the median for each class.

proc print data=save;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 5 replies
  • 663 views
  • 0 likes
  • 2 in conversation