Help using Base SAS procedures

How to limit the number of decimal places in an output from proc means

Accepted Solution Solved
Reply
Contributor
Posts: 52
Accepted Solution

How to limit the number of decimal places in an output from proc means

PROC MEANS has the option of MAXDEC which can control the number of decimal places in the output. But this option cannot exert control for the output data.

PROC MEANS DATA=work.model MEAN;

VAR _all_;

OUTPUT OUT=work.param(DROP=_NAME_ _TYPE_ _FREQ_ modelid) MEAN=;

RUN;

In this way, all variables in the outoput will have many decimal places.

Maybe I need to manually use a FORMAT statement to change this?


Accepted Solutions
Solution
‎07-12-2011 11:37 AM
Respected Advisor
Posts: 3,777

How to limit the number of decimal places in an output from proc means

In that case I would just use a format statment for the VARS in PROC MEANS.

View solution in original post


All Replies
Respected Advisor
Posts: 3,777

How to limit the number of decimal places in an output from proc means

The mean should inherit the FORMAT associated with the analysis variables.  Then you can have difference formats for each variable if needed.

Contributor
Posts: 52

How to limit the number of decimal places in an output from proc means

The decimal places are inherited from the proc logistic. They are the parameter estimates as

OUTEST=. So I need to control the decimal places at the proc logistic step.

Solution
‎07-12-2011 11:37 AM
Respected Advisor
Posts: 3,777

How to limit the number of decimal places in an output from proc means

In that case I would just use a format statment for the VARS in PROC MEANS.

☑ This topic is SOLVED.

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

Discussion stats
  • 3 replies
  • 1454 views
  • 0 likes
  • 2 in conversation