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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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