Help using Base SAS procedures

percentages in a tabulate.

Reply
N/A
Posts: 0

percentages in a tabulate.

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).
SAS Super FREQ
Posts: 8,740

Re: percentages in a tabulate.

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
Ask a Question
Discussion stats
  • 1 reply
  • 85 views
  • 0 likes
  • 2 in conversation