Help using Base SAS procedures

PROC SQL OR TABULATE

Reply
Regular Contributor
Posts: 157

PROC SQL OR TABULATE

Hi,

I mostly do my claculations in Proc Sql but it takes some good amount of steps.I came to know that we can use Proc Tabulate.I just want to know which is the better way and which takes less time if i have huge data.Any suggestions will be appreciated.

Frequent Contributor
Posts: 80

PROC SQL OR TABULATE

Hi JasonNC

Could you please share your Proc Sql code for we suggest a better solution to you?

Augusto.

Respected Advisor
Posts: 4,930

PROC SQL OR TABULATE

If your data is already sorted as expected by PROC TABULATE then the procedure is quite efficient and can save YOU a lot of time and effort. At least, that's my experience.

PG

PG
Respected Advisor
Posts: 3,156

PROC SQL OR TABULATE

Efficiency wise, I also suggest you take a look into hash object. After SAS 9.2, Hash is capable to do lots of summary and does support non-unique key.

Regards,

Haikuo

Super User
Posts: 19,855

PROC SQL OR TABULATE

Depends on what you're calculating.

If you need distinct counts of something SQL will give that you more easily, perhaps HASH as well, but I'm not familiar with that.

Otherwise tabulate is very convenient, but proc means and summary also do very nice summaries. You can also look into the ODS tables to get more customizable output.

Super User
Posts: 11,343

PROC SQL OR TABULATE

I generally think of SQL for data manipulation and TABULATE for data presentation.

Suppose I want to display some test results with nested leveles of display such as a region and subregions for rows and age-group and gender for columns and cells to represent mean and stand deviation of test scores.

Tabulate will do that quite nicely and present it in a pretty nice looking table. Adding in the ability to group and display data using MULTILABLE formats and/or forcing all formatted values of variables to appear if desired it gets pretty powerful.

You can get output from tabulate but in my experience it is an odd day when I need to.

Ask a Question
Discussion stats
  • 5 replies
  • 244 views
  • 0 likes
  • 6 in conversation