Hello SAS Forum Users,
I'm trying to create a report that bins my variable into groups (say quartiles) and then find the mean for the variable in the bin. When I use a format in proc summary, the format applies to both the binned value(class variable) and the analytical variable.
See the below code as an example with the problem that I am having. Using the SASHELP tables, the output data set has the class variable, mean and std all formated with the quartilefmt. Is there a way to only apply the format to the class variable, so I can see the mean and std with no formatting?
Thanks
proc format;
value quartilefmt
low - 43155 = '1'
43155 <- 118849 = '2'
118849 <- 336513 = '3'
336513 <- high = '4';
proc summary data=sashelp.shoes nway;
class inventory;
format inventory quartilefmt.;
var inventory;
output out=inventory_by_quartiles mean=mean std=std;
run;