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

Re: st: Re: Unique identifier

From   Mark Schaffer <[email protected]>
To   [email protected], Janet Willard <[email protected]>
Subject   Re: st: Re: Unique identifier
Date   Fri, 29 Oct 2004 13:44:39 +0100 (BST)


Quoting Janet Willard <[email protected]>:

> I have a dataset that consists of a number of patients and the tooth
> treated, typically of the form Evans LL5. I wanted to combine these
> into a 
> single numerical variable to identify each specific patient / tooth
> combination. The syntax I have used is:
> catenate code = patient tooth,punct(no)
> encode code,gen(code1)
> This returns a long variable which has the "numerical value"
> EvansLL5. What 
> I really wanted was a numerical variable such as 1. Can I achive
> this?

The -group- option of the -egen- command, applied to the variable you've 
created above, might do the trick.


> Many thanks,
> Janet
> _________________________________________________________________
> It's fast, it's easy and it's free. Get MSN Messenger today! 
> *
> *   For searches and help try:
> *
> *
> *

Prof. Mark Schaffer
Director, CERT
Department of Economics
School of Management & Languages
Heriot-Watt University, Edinburgh EH14 4AS
tel +44-131-451-3494 / fax +44-131-451-3008
email: [email protected]


This e-mail and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to
whom it is addressed.  If you are not the intended recipient
you are prohibited from using any of the information contained
in this e-mail.  In such a case, please destroy all copies in
your possession and notify the sender by reply e-mail.  Heriot
Watt University does not accept liability or responsibility
for changes made to this e-mail after it was sent, or for
viruses transmitted through this e-mail.  Opinions, comments,
conclusions and other information in this e-mail that do not
relate to the official business of Heriot Watt University are
not endorsed by it.
*   For searches and help try:

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