BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm preparing a long data book with proc tabulate but I would like to
present the percentages only referred to valid cases. I want show the
number of missing values but outside of the 100% calculation (the
option missing includes them as a category).
I know that proc freq gives this information, but it is possible with
proc tabulate?

Thank you very much!


Guillem Paluzie
Barcelona
2 REPLIES 2
ChrisNZ
Tourmaline | Level 20
Can you give an example of the output you'd like?
deleted_user
Not applicable
This is the basic code:
PROC TABULATE DATA = WORK.ARISCAT2 MISSING;
CLASS b15 Tipus;
TABLES (b15 all='Total'),
(Tipus ALL='Total')*(n='n'*f=commaX6.0 pctn='%'*f=commaX6.1) ;

RUN;

And the output has this values:

b15 Tipus
A B Total
'Missing' 8 (0.3%) 1 (0.2%) 9 (0.3%)
Negative 2019 (81.9%) 449 (86.0%) 2468 (82.7%)
Positive 437 (17.7%) 72 (13.8%) 509 (17.0%)
Total 2464 (100%) 522 (100%) 2986 (100%)

I would like an output with the missing values outside percentage calculation as:

b15 Tipus
A B Total
'Missing' 8 1 9
Negative 2019 (82.2%) 449 (86.2%) 2468 (82.9%)
Positive 437 (17.8%) 72 (13.8%) 509 (17.1%)
Total 2456 (100%) 521 (100%) 2977 (100%)

With this table I would inform about number of missing observation but the percentages are based in valid cases.

Thanks four your interest.

G. Paluzie

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 993 views
  • 0 likes
  • 2 in conversation