The SAS Output Delivery System and reporting techniques

Setting numeric variable length for an ODS output from Proc Univariate

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Setting numeric variable length for an ODS output from Proc Univariate

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


Accepted Solutions
Solution
‎06-02-2015 03:14 PM
Super User
Super User
Posts: 7,074

Re: Setting numeric variable length for an ODS output from Proc Univariate

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

View solution in original post


All Replies
Solution
‎06-02-2015 03:14 PM
Super User
Super User
Posts: 7,074

Re: Setting numeric variable length for an ODS output from Proc Univariate

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

Super User
Posts: 11,343

Re: Setting numeric variable length for an ODS output from Proc Univariate

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?

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 519 views
  • 3 likes
  • 3 in conversation