John Milam wrote:
. . . "I tried treating the CIP Code as a numeric variable, but this drops
leading and trailing zeros which is unacceptable."
If this helps at all, you can format a numeric to show leading and trailing
zeroes.
Joseph Coveney
. clear
. set obs 2
. generate float CIP_Code = 01.1110
. replace CIP_Code = in 2
. ormat CIP_Code %07.4f
. clist, noobs
CIP_C~e
01.1110
00.0000
. tabulate CIP_Code
CIP_Code | Freq. Percent Cum.
------------+-----------------------------------
0.0000 | 1 50.00 50.00
1.1110 | 1 50.00 100.00
------------+-----------------------------------
Total | 2 100.00
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/