Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Education CIP Codes with Label Define


From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   Re: st: Education CIP Codes with Label Define
Date   Thu, 08 Jan 2004 07:57:15 +0900

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index