BookmarkSubscribeRSS Feed
Sathish_jammy
Lapis Lazuli | Level 10

Dear Experts,

 

I have a table to evaluate the Sum/Count using Proc Tabulate procedure.

If the class value has (0/Null/Missing) value it omits that entire class row in the table. but I need to specify the null value too.

I'll share the code and Image for a better understanding.

 

proc tabulate data = Sv.SRK;
title '17) Monthly Income of Respondent';
class Monthly_Inc15 Qut2_Sex;
tables Monthly_Inc15 all, (Qut2_Sex *(n*f=8. colpctn='%')) all='Total'*(n*f=8. reppctn='%')/rts=10;
run;

tsab.jpg

In the given table

80,001 - 1,00,000

1,00,001 - 1,25,000

1,25,001 - 1,50,000

1,50,001 - 1,75,000

till 2,75,000 class value is missed.

 

I want to display the gender values like 0 for the missed Monthly_Inc value.

Kindly suggest some ideas to solve the task.

Thanks in advance!

 

6 REPLIES 6
andreas_lds
Jade | Level 19

Have you tried using the missing option?

Sathish_jammy
Lapis Lazuli | Level 10

@andreas_lds  Tried, But that doesn't work

andreas_lds
Jade | Level 19

ok, can you post an excerpt of the data you have?

Ksharp
Super User

proc tabulate data = Sv.SRK;
title '17) Monthly Income of Respondent';
class Monthly_Inc15 Qut2_Sex / missing ;
tables Monthly_Inc15 all, (Qut2_Sex *(n*f=8. colpctn='%'))
all='Total'*(n*f=8. reppctn='%')/rts=10 printmiss ;
run;

Ksharp
Super User

class Monthly_Inc15 / missing ;

class Qut2_Sex / missing ;

ballardw
Super User

You may be looking for PRELOADFMT along with the class option missing and the table option Printmiss.

If your class variable doesn't have a format currently applied you may need to create one for use in the table.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 6 replies
  • 978 views
  • 0 likes
  • 4 in conversation