How to give Significant digits and decimal places in SAS

Reply
Contributor
Posts: 26

How to give Significant digits and decimal places in SAS

Dear all,

i've a dataset like given bellow

                

ABCD
N363636
Mean9581.17289791.52621366.1106
SD2965.86262982.0749 398.3543
Geo_Mean9170.2867 2.0864674 1312.3213
CV13.95511 13.455669 0.159741

 

Now i need to give 3 decimal places for the variables 'B' & 'C', and 5 significant digits for the variable 'D'. But these decimal places and significant digits should not be applyed for observations of 'N'. i had tried many things like format, length and etc. but it didn't work well. the output should be like given bellow.


ABCD
N363636
Mean9581.1729791.5261366.1
SD2965.8622982.074398.35
Geo_Mean9170.2862.086 1312.3
CV13.955 13.4550.15974


i'm excited to find is it really possible? if so, can anyone tell me how? or it is possible by transforming the variables?

Thanks in advanc

Grand Advisor
Posts: 9,748

Re: How to give Significant digits and decimal places in SAS

It might help to describe how you generated the example start data set. That approach may be limiting what you can accomplish.

The basic tool SAS uses for displaying values is a format. However a single variable or column may have only one format associated with it as a dataset characteristic.

The report procedures Report and Tabulate may allow creating displays with the appearance you are requesting.

Post a Question
Discussion Stats
  • 1 reply
  • 1957 views
  • 0 likes
  • 2 in conversation