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

Re: st: recoding variables by abbreviating answer categories


From   Edwin Leuven <[email protected]>
To   [email protected]
Subject   Re: st: recoding variables by abbreviating answer categories
Date   Mon, 5 May 2003 12:26:00 +0200

g abbrcode = int(code/10000)

On Mon May 5 2003 12:15, Heleen Sinte Maartensdijk wrote:
> Is there a possibility to abbreviate the answer categories of a variable.
> For example: A variable has answercategories existing of 5 numbers. These
> are codes, and only the first number of the answercategorie is important.
> So you want to change the values of the particular variable from the 5
> numbers to only the first number. Say 58722  53879 have to become 5, and
> 38905 39648 have to become 3, etcetera. How can you reach this result?

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