Posted by : Netbloggy Friday, October 2, 2015

Sometimes it's not desirable just to display the output of the PROC FREQ as it is. As an analyst, sometimes our organization would require us to tweak it a bit.


Problem:

Using the SAS data set Blood, produce a table of frequencies for BloodType, in
frequency order. (17:7)

Solution:

/*Using the SAS data set Blood, produce a table of frequencies for BloodType, in
frequency order.*/
 
 
TITLE 'FREQUENCY OF CHOLESTROL GROUPED ORDERED BY INPUT DATA';
PROC FREQ DATA=A15001.A01_BLOOD ORDER=DATA;
 TABLE BLOODTYPE;
RUN; 
 
TITLE 'FREQUENCY OF CHOLESTROL GROUPED ORDERED BY INPUT FREQUENCY';
PROC FREQ DATA=A15001.A01_BLOOD ORDER=FREQ;
 TABLE BLOODTYPE;
RUN; 
TITLE;
 

Output:


Learning:

  • How to change the order of variables displayed in the PROC FREQ Output


Leave a Reply

Subscribe to Posts | Subscribe to Comments

Popular Post

Blogger templates

Total Pageviews

Powered by Blogger.

- Copyright © nulldata -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -