Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: using encode to order string distances

From   Tim Evans <>
To   "''" <>
Subject   st: using encode to order string distances
Date   Mon, 24 Oct 2011 16:35:58 +0100

Hi all,

I have distances stored in strings like:


up to 

I want to encode these to keep the current values as labels and replace the numbers behind them as 1-12.

When I encode and generate a new variable I end up with 100+ as the 3rd value rather than the 12th value.

How can I force encode to make sure 100+ is the 12th and not the 3rd value.

I'm using 

encode nearestcentre, generate(NRCENT)

Best wishes

This email and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(s), please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail or any attachments, as this may be unlawful.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index