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/