Help using Base SAS procedures

Missing and proc tabulate

Reply
N/A
Posts: 0

Missing and proc tabulate

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
PROC Star
Posts: 1,562

Re: Missing and proc tabulate

Can you give an example of the output you'd like?
N/A
Posts: 0

Re: Missing and proc tabulate

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
Ask a Question
Discussion stats
  • 2 replies
  • 116 views
  • 0 likes
  • 2 in conversation