I am currently running this following code,
proc tabulate data=sashelp.cars; class origin drivetrain type; var msrp; table (drivetrain * (N)) (msrp * (N MEAN MEDIAN MIN MAX)), ALL origin type/ misstext='0'; run;
The current output looks something like this,
The issue I'm facing currently is, I do not want to display columns Sedan and Sports but at the same time I do not want my over all count for Origin or All to get affected. Is it possible to achieve this by any means?
Thanks in advance! 🙂
It has been many, many years since I have last used PROC TABULATE, so I do not know very well about the best answer.
You can have two 'table' statements of course in the same PROC TABULATE, one with ORIGIN and one with TYPE.
Or you can save the output table in an output dataset with ODS OUTPUT and work further from there.
ods trace on; ods output table=work.table; proc tabulate data=sashelp.cars; ... run; /* end of program */
You can alternatively do some base SAS programming to get what you want or maybe it is easier to do with PROC REPORT? I think in PROC REPORT it is easier to suppress columns in the display while they are still used for some of the statistics.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.