Limiting Decimal Places

By default, PROC MEANS uses the BESTw. format to display numeric values in the report.
When there is no format specification, SAS chooses the format that provides the most information about the value according to the available field width. At times, this can result in unnecessary decimal places, making your output hard to read.
proc means data=clinic.diabetes min max; 
run;
Figure 9.3 Variables Formatted with BESTw. Format
Variables Formatted with BESTw. Format
To limit decimal places, use the MAXDEC= option in the PROC MEANS statement, and set it equal to the length that you prefer.
Syntax, PROC MEANS statement with MAXDEC= option:
PROC MEANS <DATA=SAS-data-set>
<statistic-keyword(s)> MAXDEC=n;
n specifies the maximum number of decimal places.
proc means data=clinic.diabetes min max maxdec=0; 
run;
Figure 9.4 Variables Formatted Using the MAXDEC= Option
Variables Formatted Using the MAXDEC= Option
Last updated: January 10, 2018
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.239.226