02-11-2013 04:27 PM
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!
class citi1 state;
tables citi1='' citi2='', state='Total'*value=''*sum='' / box='Citizenship';
title "Persons by Citizenship";
|Persons by Citizenship|
|Not a U.S. Citizen||5,477,903|