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

Hello!

I have a question. I am using proc univariate and used ODS output of the output, with the ultimate goal of keeping the 5% and 95%-iles. However, when I do this, the output rounds the values (for example, a 95% value of 7.7 is recorded as 8 in the new dataset; a 5% value of 2.2 is recorded as 2). For the work I am doing, that 1 decimal place is very important.

sample code:

proc univariate data=refint2.all normal;

var ALKP_VALUE2 GLU_VALUE2 AMYL_VALUE2 TBIL_VALUE2 TP_VALUE2 ALB_VALUE2 CHOL_VALUE2 BUN_VALUE2
ods output quantiles=allquantiles;

How can I create the output dataset to include that decimal value? Any help you can provide would be GREATLY appreciated! Thanks!

Emi

Thanks, guys! I did some random spot-checking on some comparisons I was having SAS make using the quantile values, and it looks like even though it looks like SAS rounded the quantile values (visually), it really didn't for the analysis. Whew! Message was edited by: EMI SAITO

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Why not just use the OUTTABLE option on the PROC UNIVARIATE statement?

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

Why not just use the OUTTABLE option on the PROC UNIVARIATE statement?

ballardw
Super User

The values I see I an output set exactly match those of the results. The procedure does pick a likely format for the variable estimate which may not be optimal for your purpose, especially if the difference in range of your different variables is large.

If you print the data and specify a format like best6. for the estimate variable what do the values look like?

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