Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Generate variable which identify same subject


From   <[email protected]>
To   <[email protected]>
Subject   st: Generate variable which identify same subject
Date   Mon, 21 Aug 2006 18:06:08 +0200

Dear all, 

I have a data set with 260 rows for 36 different subject.
All subject are identify by their name, a string variable.
I would like to create a variable "id" with value 1 for the fist subject,
value 2 for the second ... until 36

Name  id 
Alli	1
Alli 	1
Alli	1
Bear	2
Chea	3
Chea	3
.
.
.

How can I do ?

Thank you 

Alvine 


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