From | Phil Schumm <[email protected]> |
To | [email protected] |
Subject | Re: st: encode |
Date | Fri, 21 Jan 2005 17:18:06 -0600 |
At 5:47 PM -0500 1/21/05, Sarah Mustillo wrote:
I'm recoding a substantial number of text responses into categorical variables. I'm finding it easier to -encode- the variables with the text responses first, before replacing the categorical variables with the correct value - this way I can avoid typing out all the text responses in the -replace- command and just type their encoded numbers. I have done this for 6 variables, and it worked fine for 5 of them. I cannot figure out what went wrong with the 6th.
The variable I am trying to encode has about 90 categories. When I encode though, the resulting variable I generate begins at number 8 and ends at 238. The first category (text response) gets an 8, the second gets a 12, and so forth. The manual states that -encode- alphabetizes before it encodes, but that doesn't explain my problem. I would still expect the numbers to go sequentially, which they have with the other 5 variables.
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |