BookmarkSubscribeRSS Feed
momin
Calcite | Level 5
I useddonor_relationFrequency Count
related18
spousal23
unrelat

23

I created this file using the following code

proc freq data=b  ;

table donor_relation/nocum nopercent out=how2;

run;

the question is how can I get the total sum of all frequencies at the bottom.Is there any other methodwhich I can use?

non

2 REPLIES 2
stat_sas
Ammonite | Level 13

Proc tabulate can provide total of all frequencies at the bottom in addition to frequency of each level. Try this.

proc tabulate data=b;

class donor_relation;

table donor_relation all='Total',n='Frequency Count';

run;

arodriguez
Lapis Lazuli | Level 10

I think that if you export the dataset adding the option out=nameoftheoutput it will create a table that have totals, something likev

VAR1          VAR2          Freq

                                      ...

lev1                                  ....

                    lev1              ....

lev1               lev1             ....

...                    ...              ...

where rows without levels is the total, rows with only a level in one of the variables is the sum of the row or column

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 ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 2090 views
  • 0 likes
  • 3 in conversation