hello,
When I perform proc univariate in order to compute percentiles I obtain this output
per20x1 | per40x1 | per20x2 | per40x2 | |
1 | 1165.91 | 1199.26 | 2.9595 | 2.995 |
---|
I want to have this table
X1 X2
per20 1165.91 2.9595
per40 1199.26 2.995
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
try proc means + odsstack option .
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
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: