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
Diamond | Level 26
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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 836 views
  • 0 likes
  • 2 in conversation