« Site Publishes Students' Art for the World to see | Main | SAS Blogger's Priceless Blog Header Image »

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!

Posted on Saturday, January 31, 2009 by Registered CommenterJared in , | CommentsPost a Comment

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>