Programming the statistical procedures from SAS

Proc Tab - missing class

New Contributor
Posts: 2

Proc Tab - missing class

Hi, does anyone know how to hide or eliminate the line from including the 'missing' in Proc Tabulate?  In my case, it would be the line showing 5,477,903 with no label (see below).  I am trying to generate a single table showing citizenship: (1) Total US citizens, (2) of the US citizens, who are natives and who are naturalized citizens, and (3) Non-citizens.

The class variable citi1 determines where a person is a US citizen or not a US citizen.  Each record (each person) gets assigned a value.

The class variable citi2 determines whether a person who is a US citizen is a native or naturalized citizen.  Non-citizens do not get a value assigned; citi2 is blank.

Here are my code and output.  I am trying to eliminate the line showing 5,477,903 with no label, which is a result of including the missing option in my proc tab code.  However, if I don't include the missing, then it will drop all records that don't have a citi2 value and my table will not have  'Not a US Citizen'.  Any help?  Thanks!

proc tabulate;

class  citi1 state;

class citi2/missing;

var value;

tables citi1='' citi2='', state='Total'*value=''*sum='' / box='Citizenship';

title "Persons by Citizenship";


Persons by Citizenship
US Citizens31,278,763
Not a U.S. Citizen5,477,903
Ask a Question
Discussion stats
  • 0 replies
  • 1 in conversation