Statalist The Stata Listserver


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

st: Re: New values for a value labelled variable


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: New values for a value labelled variable
Date   Thu, 14 Sep 2006 08:16:56 -0400

Roger Newson wrote the package -sencode- to do this. Type -ssc describe sencode- to see if this is what you want and install it. You may need to decode the currently encoded variable first if you don't have a string version in the dataset.

M Blasnik


----- Original Message ----- From: "Serguei Kaniovski" <[email protected]>
To: <[email protected]>
Sent: Thursday, September 14, 2006 8:08 AM
Subject: st: New values for a value labelled variable



Hi all,

I have a variable with (many) value labels, say

12-joe
23-mike
12-joe
45-helen
24-tom
...

I would like to create a new variable with consecutive values assigned to the old labels, e.g.

1-joe
2-mike
1-joe
3-helen
4-tom
...

It is important that the sequence of names is preserved.

Thanks a lot,
Serguei Kaniovski
*
*   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