Hi all,
below is my data:
And I am using below code:
proc sort data=adsl(keep=trt01pn age); by trt01pn; run;
proc means data=adsl maxdec=2 noprint;
by trt01pn;
var age;
output out=age_ n=n1 mean=mean1 std=std1 median=med min=min1 max=max1;
run;
Getting below result with missing decimal places, what might be the reason for missing decimal places?
How can get values with decimal places?
Thanks,
Adithya
I suspect it is a default you have set to view tables.
If you print the data you would likely see the decimals for MEAN1 and STD1, the only variables that might have a decimal.
Or you may need to provide an explicit format when printing.
Why bother with the MAXDEC=2 when using NOPRINT? From the documentation for Proc Means:
MAXDEC=number
specifies the maximum number of decimal places to display the statistics in the printed or displayed output. MAXDEC= has no effect on statistics that are saved in an output data set.
Yes, how I can I get decimal places to my output dataset? where can I change that setting?
Got it. Thanks!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.