BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi, I'm using a fairly simple code to make a cross-tabulation table with grades 1 to 5 (pre-adjustment grades) down the side against grades 1 to 5 and 'Exclusions' (post-adjustment grades) across the top as follows:

proc tabulate data=work.current;
class before_adjustment after_adjustment /order=data;
classlev before_adjustment after_adjustment /s=[background=white];
table Before_Adjustment=' ' all={ label='Total' s=[background=vligb]},
N=' '*(After_Adjustment='Period 2 - Current' all={ label='Total' s=background=vligb]})*F=comma12./RTS=10.
box='Period 1 Previous' misstext=' ';
run;

The thing is, one of the columns on my table is called 'Exclusions' and I would like these figures excluded from the Total (or 'all') at the end of the table.
Does anyone know of any way of doing this?

Any help greatly appreciated!
2 REPLIES 2
ChrisNZ
Tourmaline | Level 20
You'll have to do your tweaked sum before hand I am afraid, as in:
[pre]proc summary data=sashelp.class nway noprint;
class AGE;
output out=CLASS;
run;
data TAB;
set CLASS;
if AGE <14 then TOT+_FREQ_;
label TOT= 'Total for <14';
run;
proc tabulate data=TAB;
var TOT _FREQ_;
class AGE;
table (AGE all='Total')*_FREQ_=''*sum=''*f=2.0 TOT*max='';
run;
deleted_user
Not applicable
Ok, thanks for your help!

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