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

st: Re: Unique Identifier


From   "Janet Oliver" <[email protected]>
To   [email protected]
Subject   st: Re: Unique Identifier
Date   Mon, 05 Jan 2004 13:59:48 +0000

I have a dataset that consists of a name (of various lengths), a treatment
and a time period (0..5) with not all patients being seen at the six times,
and various clinical results. I wanted to create a unique numerical
identifier based on name|treatment|time. I initally concatenated the
variables "egen tid=concat(patient treat time)" and the tried to destring
tid but this failed with the error message "tid contains non-numeric
characters; no generate". I have examined the variables in the editor and
cannot see any non-numeric characters.
My questions are 1) Is there any way of determining non-numeric characters
or 2) Is there an efficient method of combing name|treatment|time and
generating a unique ID (preferably starting at 1 and increasing
sequentially) - or should I just type in the IDs by hands.
Many thanks.
Janet

_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger
http://www.msn.co.uk/messenger

*
*   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