BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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';
RUN;

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?

Thanks!!
2 REPLIES 2
deleted_user
Not applicable
For some reason an emoticon appeared where I had a > ... my program does NOT include a winking smiley face!!
Olivier
Pyrite | Level 9
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.

Olivier

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 2 replies
  • 794 views
  • 0 likes
  • 2 in conversation