Mystery of Proc Tab Inserting the Word "And"
In a response to my own thread on the SAS Google group, my supervisor and I found a solution to the appearance of the mysterious word "and" in our Proc Tabulates.
The answer came from the SUGI paper Anyone can Learn Proc Tabulate which discussed the _PAGE_ variable and Three dimensional proc tabs.
In Three dimensional Proc Tabs, if you don't supply 'labels' for the Page dimension, it will simply print out their values. See this following example which prints the values for "origin" and "make" on the top left:
PROC TABULATE DATA=sashelp.cars noseps;
CLASS make type origin drivetrain;
table origin = ' ' * make = ' ',
type = ' ' , drivetrain = ' ' ;
RUN;
Now if we add a label (e.g. origin = 'Origin is equal to ') then SAS puts an "and" between origin and make:
PROC TABULATE DATA=sashelp.cars noseps;
CLASS make type origin drivetrain;
table origin = 'origin is equal to = ' * make = 'make is equal to = ',
type = ' ' , drivetrain = ' ' ;
RUN;
In the top left you should see this heading:
origin is equal to = USA
and make is equal to = Saturn
My original question was if the word "and" could be removed while keeping both the custom label and printed value. I still don't know the answer, but I sure learned a lot about Proc Tabulate!


Reader Comments