PROC REPORT versus TABULATE: two SAS heavyweights

1

The question came up on the SAS Enterprise Guide discussion forum: which do you prefer, List Report Wizard (PROC REPORT) or Summary Tables (PROC TABULATE)?

And as with most SAS-related questions, the proper response is: "it depends." If you put these two PROCs in the ring with a Google Fight, PROC REPORT is a clear winner.

Cynthia@SAS delivered a very thoughtful answer. She first carefully separated out the "point-and-click" versus "code-it-yourself" concerns, highlighting the capabilities and limitations of the tasks within SAS Enterprise Guide. Then, for the people who want follow a programming approach, Cynthia offers these insights:

But for the beginner, I think the biggest issue that I've heard about (and it surprised me) was whether they wanted the box area in the upper left hand corner of the table. For some folks, it doesn't matter that the BOX is there -- but I've had some students switch to PROC REPORT just because they didn't like the big empty box -- seriously -- the BOX area was a deal breaker for them -- they wanted the look that they got with PROC REPORT.

The second issue that I've heard about is changing the code -- some people find the PROC REPORT code easier to understand than the TABULATE code -- if and only if they have to change the code. The TABULATE code is more abbreviated and "algebra-like" with all the * and = in the TABLE statement. Even though the REPORT code is more verbose -- the existence of a COLUMN statement makes it clear which variable will come first on the report row, which second, which third, etc, etc. And then the explicit DEFINE statement makes it easy to see what statistic will get used for a numeric variable, the usage for a category variable (ORDER, GROUP or ACROSS).

So, as you can see, sometimes it actually does come down to a "BOXing" match. <groan...sorry>

Share

About Author

Chris Hemedinger

Director, SAS User Engagement

+Chris Hemedinger is the Director of SAS User Engagement, which includes our SAS Communities and SAS User Groups. Since 1993, Chris has worked for SAS as an author, a software developer, an R&D manager and a consultant. Inexplicably, Chris is still coasting on the limited fame he earned as an author of SAS For Dummies

1 Comment

  1. I agree that the box in proc tabulate becomes very problematic, when you are trying to create a report that will be used like data and the grouping variables create an additional meaningless empty row. I good way to remedy both issues, is to blank out the grouping headings and just populate the empty box with the grouping headings...

    Also, Proc tabulate does NOT allow you to fully compute variables off of the sums(or another analysis) at a row level and I don't mean like row percent. So, proc report would win in the ring. The biggest challenge I found was that when you're trying to compute a variable using analysis variables, you can't use computed_variable=analysis_variable1.sum/analysis_variable2.sum. You will get an error. You have to use absolute columns. Meaning you have to count the columns and name them C1, C2, C3 (and remove the statistics like .sum .average, etc..)

Back to Top