02-09-2012 02:21 AM
When using Proc tabulate,especially 3 dimensions.
the output format can not comply with each other in the first dimension, say "City",because in City 'Houston' for occupation 'Mine' there maybe null and no output, while in City 'Texas' occupation 'Mine' might exist and have count. the output column/row numbers maybe different for city houston and texas.
I want every dimension output with the same output format that is to say to keep all those nill (city houston and texas with the same output column/row numbers), for the purpose for easy copy to excel files.
thanks in advance for your useful reply.
02-09-2012 09:30 AM
There are a few options that are related to your question. Any of these could be added to the PROC TABULATE statement.
Normally, PROC TABULATE removes any observations that have a missing value for a CLASS variable. MISSING requests that they remain in the analysis.
To use this, you have to create a SAS data set holding all the combinations of the CLASS variables that you would like to see in your table (even if no observations actually exist for some of the combinations). That will get the full set of combinations to appear on the table. I suspect this is the one that you are looking for, but you will need to create that "shell" SAS data set first.
In combination with CLASSDATA=, specifies that combinations that appear in the data, but are not in your CLASSDATA= data set, should be removed.
02-09-2012 12:25 PM
In addition, options PRINTMISS (which has already been discussed) and PRELOADFMT used with PRINTMISS. Take a look at Example 3 in the TABULATE doc for some examples: http://support.sas.com/documentation/cdl/en/proc/63079/HTML/default/viewer.htm#p1f1t9bipbeqy5n1vowhz...
02-09-2012 09:30 PM
Thank you all for your prompt response, please spare me some time to check whether it works.
I'm very appreciated with your help. thanks.