[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Individual IDs with non-numeric characters

From   "Lachenbruch, Peter" <>
To   <>
Subject   st: RE: Individual IDs with non-numeric characters
Date   Mon, 2 Feb 2009 15:27:04 -0800

If you have only one observation per id, you might try
Sort id  * if it makes sense to sort them
Gen idnum=_n

If you have multiple observations per id, you can generalize this easily


Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001

-----Original Message-----
[] On Behalf Of Benson Limann
Sent: Monday, February 02, 2009 2:59 PM
Subject: st: Individual IDs with non-numeric characters

Dear all:
The individual IDs in my dataset are in the string format. I currently
use -destring- to make them numeric. But, unfortunately, some individual
IDs have non-numeric characters. As a result, -destring- with the
-force- option deletes all these individuals automatically. 
Given that I want to sort all the observations, is it possible to keep
these individuals with non-numeric IDs?
Any suggestion will be greatly appreciated,
Hotmail(r) goes where you go. On a PC, on the Web, on your phone.
*   For searches and help try:

*   For searches and help try:

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