I'm trying to format the mean as a percentage. this is the code I used:
proc means data=omrswork; where count_carf1 >0 and count_carf2=0 and count_carf3=0 and count_carf4=0 and dc_fiscal_year=2 and dc_fiscal_year^=99 and percent_nscx^=.; var percent_nscx; format dc_fiscal_year fiscalyear. percent_nscx percent8.2 site site.; run;
How come the percent.8.2 format isn't working for the actual mean that is calculated?
When I run the proc means, the mean is still in decimal form.
Christina,
This is a topic that has tripped up many people. Here is the combination of factors at work:
Since PROC MEANS is calculating statistics, and printing the statistics (not the original variable), the format is ignored.
Theoretically, you could ask PROC MEANS to create an output data set. Then print the output data set while adding a FORMAT statement.
Christina,
This is a topic that has tripped up many people. Here is the combination of factors at work:
Since PROC MEANS is calculating statistics, and printing the statistics (not the original variable), the format is ignored.
Theoretically, you could ask PROC MEANS to create an output data set. Then print the output data set while adding a FORMAT statement.
Thanks Astounding! this is helpul to know:)
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.