The SAS Output Delivery System and reporting techniques

proportions and proc tabulate

Posts: 0

proportions and proc tabulate

I would like to have proportions rather than percents output when I use Proc Tabulate.

For example, I have a program that reads as follows:

PROC TABULATE data = data set MISSING;
CLASS hotelname billprob;
TABLES NAME=' ',(billprob)*(n pctn)/ misstext='0';

I am getting just what I want (the percent of people responding yes versus no to having a billing problem for each of a series of hotels). BUT ideally I would like a proportion.

I have searched and searched and can't seem to find a format or command to get proportions in proc tabulate.

Any ideas?

Posts: 0

Re: proportions and proc tabulate

For some reason an emoticon appeared where I had a > ... my program does NOT include a winking smiley face!!
Super Contributor
Posts: 260

Re: proportions and proc tabulate

I can't think of any way to do that with a simple Tabulate procedure.
But I believe you can achieve this computing counts and proportions beforehand, storing them in a dataset, and creating a text variable with the right proportion in it. Then display your dataset with either REPORT or PRINT procedures, to get the right outfit.

Ask a Question
Discussion stats
  • 2 replies
  • 2 in conversation