BookmarkSubscribeRSS Feed
JasonNC
Quartz | Level 8

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.

5 REPLIES 5
Augusto
Obsidian | Level 7

Hi JasonNC

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

Augusto.

PGStats
Opal | Level 21

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
Haikuo
Onyx | Level 15

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

Reeza
Super User

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.

ballardw
Super User

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1971 views
  • 0 likes
  • 6 in conversation