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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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