BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm attempting to create a table that contains two characteristics and I want to return the propotional split of those characteristics based on a variable (not n).

This is the code I am trying to use but something is causing an error:

proc tabulate data=scoredata missing;
table CHAR1 CHAR2 all, PAGEPCTN;
class CHAR1 CHAR2;
var VAR1;
run;

The output I'm expecting will have the values of char1 and char 2 down the left hand side with the % split of var1 in the middle with the sum of all the var1's totalling 100% for each char1 and char2 (200% in total).
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
You can only specify a denominator with PCTN and PCTSUM statistics. So you are probably getting an error on PAGEPCTN usage.

This documentation example and these user group papers may help to clarify the usage of <denom> in PROC TABULATE.

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a002473764.htm
http://www2.sas.com/proceedings/sugi24/Handson/p153-24.pdf
http://www2.sas.com/proceedings/forum2007/230-2007.pdf

cynthia

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 594 views
  • 0 likes
  • 2 in conversation