The great divide among data types in Stata is between numeric and string variables. Most of the time, which kind you want to use for particular variables is clear and unproblematic, but surprisingly often, users face difficulties in making the right decision or need to convert variables from one kind to another. The main problems that may arise and their possible solutions are surveyed with reference both to official Stata and to user-written programs.
ChambersJ. M., and HastieT.J.1992. Statistical Models in S.Pacific Grove, CA: Wadsworth and Brooks/Cole.
2.
CoxN. J.1999a. dm45.1: Changing string variables to numeric: update. Stata Technical Bulletin49: 2. In Stata Technical Bulletin Reprints, vol. 9, 14. College Station, TX: Stata Press.
3.
CoxN. J.1999b. dm45.2: Changing string variables to numeric: update. Stata Technical Bulletin52: 2. In Stata Technical Bulletin Reprints, vol. 9, 14. College Station, TX: Stata Press.
4.
CoxN. J.2002a. Speaking Stata: How to face lists with fortitude. Stata Journal2(2): 202–222.
5.
CoxN. J.2002b. Speaking Stata: How to move step by: step. Stata Journal2(1): 86–102.
6.
CoxN. J., and GouldW.W.1997. dm45: Changing string variables to numeric. Stata Technical Bulletin37: 4–6. In Stata Technical Bulletin Reprints, vol. 7, 34–37. College Station, TX: Stata Press.
7.
CoxN. J., and WernowJ.B.2000a. dm80: Changing numeric variables to string. Stata Technical Bulletin56: 8–12. In Stata Technical Bulletin Reprints, vol. 10, 24–28. College Station, TX: Stata Press.
8.
CoxN. J.2000b. dm80.1: Update to changing numeric variables to string. Stata Technical Bulletin57: 2. In Stata Technical Bulletin Reprints, vol. 10, 28–29. College Station, TX: Stata Press.
9.
GleasonJ. R.1998. dm56: A labels editor for Windows and Macintosh. Stata Technical Bulletin43: 3–6. In Stata Technical Bulletin Reprints, vol. 8, 5–10. College Station, TX: Stata Press.
10.
GleasonJ. R.1999. dm56.1: Update to labedit. Stata Technical Bulletin51: 2. In Stata Technical Bulletin Reprints, vol. 9, 15. College Station, TX: Stata Press.
11.
McDowellA.2001. From the help desk. Stata Journal1(1): 76–85.