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

Re: st: Re: Unique identifier

From   Tom Trikalinos <[email protected]>
To   [email protected]
Subject   Re: st: Re: Unique identifier
Date   Fri, 29 Oct 2004 16:55:04 +0300

. egen patientToothID = group(patient tooth)
and you'll get a variable "patientToothID" with values 1, 2, ..., n, where n is the number of patient/tooth patterns that you have in the data set.


On Oct 29, 2004, at 4:38 PM, Janet Willard wrote:

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?
Many thanks,

It's fast, it's easy and it's free. Get MSN Messenger today!

* For searches and help try:

*   For searches and help try:

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