Dear all,
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.
Hi,
Try adding the PRINTMISS option.
Regards,
Henri
bbb_NG,
There are a few options that are related to your question. Any of these could be added to the PROC TABULATE statement.
MISSING
Normally, PROC TABULATE removes any observations that have a missing value for a CLASS variable. MISSING requests that they remain in the analysis.
CLASSDATA=
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.
EXCLUSIVE
In combination with CLASSDATA=, specifies that combinations that appear in the data, but are not in your CLASSDATA= data set, should be removed.
Good luck.
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...
cynthia
Henri,Astounding,cynthia
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.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.