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-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!

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