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

st: Re: Re: Unique Identifier


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: Re: Unique Identifier
Date   Mon, 5 Jan 2004 15:41:04 -0500

egen tid=group(patient treat time)

Michael Blasnik
[email protected]

----- Original Message ----- 
From: "Janet Oliver" <[email protected]>
To: <[email protected]>
Sent: Monday, January 05, 2004 8:59 AM
Subject: st: Re: Unique Identifier


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


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