SAS Enterprise Guide

Desktop productivity for business analysts and programmers
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

How do I calculate the 40th and 60th percentile of a column in SAS EG?

Either 4.2 or 5.1.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
TomKari
Onyx | Level 15

Hi, Reeza

40 and 60 have been added to PROC MEANS, but not the EG interface. However, easy to do:

1. Select your data.

2. Summary Statistics task.

3. Put your VAR variable in the Analysis variables, and set up the rest of the task.

4. Select Preview code.

5. Select Insert Code

6. At the end of all of the parameters for the PROC MEANS statement, before the semicolon, double-click on the "double-click to insert code" entry point.

7. In the Enter User Code box, type

P40 P60

OK your way out, and close the preview code window. When you run, you should get the 40th and 60th percentiles.

Tom

View solution in original post

4 REPLIES 4
TomKari
Onyx | Level 15

Hi, Reeza

40 and 60 have been added to PROC MEANS, but not the EG interface. However, easy to do:

1. Select your data.

2. Summary Statistics task.

3. Put your VAR variable in the Analysis variables, and set up the rest of the task.

4. Select Preview code.

5. Select Insert Code

6. At the end of all of the parameters for the PROC MEANS statement, before the semicolon, double-click on the "double-click to insert code" entry point.

7. In the Enter User Code box, type

P40 P60

OK your way out, and close the preview code window. When you run, you should get the 40th and 60th percentiles.

Tom

varun1220
Fluorite | Level 6

Any idea how to get all the 99 percentiles on SAS EG or through a program? 

 

I actually have 6 values of which I need 99 percentiles (combined). I'm trying everything available online but not getting a clue. 

 

Kindly help me if possible. 

SASKiwi
PROC Star

PROC UNIVARIATE can provide this. Check the documentation.

ChrisHemedinger
Community Manager

99th Percentile is an option in the Summary Statistics task (Describe menu).  

 

Here's an example sequence.

 

undefined

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 4 replies
  • 5246 views
  • 4 likes
  • 5 in conversation