Help using Base SAS procedures

PROC TABULATE

Accepted Solution Solved
Reply
Highlighted
New Contributor
Posts: 2
Accepted Solution

PROC TABULATE

Hi, everyone

I like to use proc tabulate to produce a table with multiple classes (to be Concatenated ) and variables, the code is fairly simple as 

 

Proc tabulate data=test;

class C1 C2 C3

var Va Vb Vc;

table C1 C2 C3, Va Vb Vc;

run;

 

However, the Tabulate procedure excludes all missing values in any classes (C1 C2 or C3). Is there a way to exclude only the relevant missing value in individual Class table (eg, only missing C1 values are excluded from C1, Va Vb Vc table). I can only achieve the desired results by kind of duplicating the code 3 times as

 

Proc tabulate data=test;

class C1

var Va Vb Vc;

table C1 , Va Vb Vc;

run;

 

Proc tabulate data=test;

class C2

var Va Vb Vc;

table C2 , Va Vb Vc;

run;

...

...

...

 

Thanks very much for your suggestions.


Accepted Solutions
Solution
a week ago
Frequent Contributor
Posts: 87

Re: PROC TABULATE

Have you considered using the MISSING option in the CLASS statement?

Norman.
SAS 9.4 (TS1M4) X64_7PRO WIN 6.1.7601 Service Pack 1 Workstation

View solution in original post


All Replies
Solution
a week ago
Frequent Contributor
Posts: 87

Re: PROC TABULATE

Have you considered using the MISSING option in the CLASS statement?

Norman.
SAS 9.4 (TS1M4) X64_7PRO WIN 6.1.7601 Service Pack 1 Workstation

New Contributor
Posts: 2

Re: PROC TABULATE

Hi, Norman21

 

Thanks a lot!! Problem solved though I don't want the missing data to be shown in the table...but that's the way SAS works


Norman21 wrote:

Have you considered using the MISSING option in the CLASS statement?


 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 129 views
  • 2 likes
  • 2 in conversation