BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sasphd
Lapis Lazuli | Level 10

hello,

When I perform proc univariate in order to compute percentiles I obtain this output

per20x1per40x1per20x2per40x2
11165.911199.262.95952.995

I want to have this table

                    X1          X2

per20     1165.91     2.9595

per40     1199.26     2.995

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  There is an example of how to get your percentiles into an output dataset in the documentation:

Example 4.8 Saving Percentiles in an Output Data Set

  However, AFTER you have the percentiles in an output dataset, to get what you want, you either need to restructure your dataset or move to a different procedure. This Tech Support note illustrates (with full code) how to reshape data from a Stat procedure.

25016 - Reshapes the default output data set from PROC UNIVARIATE, MEANS, or SUMMARY

cynthia

View solution in original post

2 REPLIES 2
Ksharp
Super User

try proc means + odsstack  option .

Cynthia_sas
SAS Super FREQ

Hi:

  There is an example of how to get your percentiles into an output dataset in the documentation:

Example 4.8 Saving Percentiles in an Output Data Set

  However, AFTER you have the percentiles in an output dataset, to get what you want, you either need to restructure your dataset or move to a different procedure. This Tech Support note illustrates (with full code) how to reshape data from a Stat procedure.

25016 - Reshapes the default output data set from PROC UNIVARIATE, MEANS, or SUMMARY

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1012 views
  • 0 likes
  • 3 in conversation