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/