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

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!

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