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

Is there any option to mention decimal places individually in Proc means?

Like if max dec=3 is mentioned in Proc means, it gives 3 decimal values for all the summary statistics. Instead, I need 4 decimal for Mean, Min Med and max 3 decimal places. can this be done?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

@SaranyaSundar wrote:

Is there any option to mention decimal places individually in Proc means?

Like if max dec=3 is mentioned in Proc means, it gives 3 decimal values for all the summary statistics. Instead, I need 4 decimal for Mean, Min Med and max 3 decimal places. can this be done?

 

Thanks


Likely your best approach would be to use Proc Means to generate an output data set with the OUT statement and then use Proc Print/Report/Tabulate to display the results where can control display formats per variable.

Or possibly go straight to Proc Report or Tabulate .

View solution in original post

2 REPLIES 2
Jagadishkatam
Amethyst | Level 16

You can try the maxdec option as below

 

proc means maxdec=2;var WEIGHT HEIGHT;
Title 'Example 1b - PROC MEANS, limit decimals, specify variables'
run;
Thanks,
Jag
ballardw
Super User

@SaranyaSundar wrote:

Is there any option to mention decimal places individually in Proc means?

Like if max dec=3 is mentioned in Proc means, it gives 3 decimal values for all the summary statistics. Instead, I need 4 decimal for Mean, Min Med and max 3 decimal places. can this be done?

 

Thanks


Likely your best approach would be to use Proc Means to generate an output data set with the OUT statement and then use Proc Print/Report/Tabulate to display the results where can control display formats per variable.

Or possibly go straight to Proc Report or Tabulate .

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 12488 views
  • 1 like
  • 3 in conversation