The SAS Output Delivery System and reporting techniques

proc tabulate and %

Reply
N/A
Posts: 0

proc tabulate and %

Hi!

I'm just starting with SAS (8.2) and I was wondering how to calculate % in a table.
For example, I have 8 individuals (ident) with a number of observations for each for the variable "height". In my table, I would like to have the n, plus the % of observations corresponding to that n for each individuals, with the total of obs. at the end. Also, how could I do the same thing, but with another variable (month). For example, I want to know how many "height=8m" occurred in july, august, etc... (n and corresponding %)?

Thank you so much!
SAS Employee
Posts: 174

Re: proc tabulate and %

Are all of the variables classification variables? Then
try:
[pre]
proc tabulate data=yourdata;
class ident height month;
table ident month, height*(n colpctn rowpctn);
run;
[/pre]
That will calculate column and row percentages. Choose whichever you like.

-- David Kelley, SAS
N/A
Posts: 0

Re: proc tabulate and %

ok thanks! It is giving me the "general" n and %, but is there a way to get the n and % for each value (10 different) for the variable height, for ident and month? like n and % for height=8m in july for example...

thanks again!
MS
SAS Employee
Posts: 174

Re: proc tabulate and %

I recommend that you contact Technical Support with your question. See http://support.sas.com/techsup/contact/submit_emits2.html .

-- David Kelley, SAS
Ask a Question
Discussion stats
  • 3 replies
  • 137 views
  • 0 likes
  • 2 in conversation