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

st: Re: encode(x) when x is numeric


From   "Scott Merryman" <smerryman@kc.rr.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: encode(x) when x is numeric
Date   Sun, 8 Dec 2002 11:23:45 -0600

egen y = group(x)

Scott

----- Original Message ----- 
From: "george m hoffman" <ghoffman@mcw.edu>
To: <statalist@hsphsun2.harvard.edu>
Sent: Sunday, December 08, 2002 10:24 AM
Subject: st: encode(x) when x is numeric


> i have a dataset with an x which is a numeric variable.  there are only 27
> unique values of this variable. i want to create variable y which takes on
> values 1-27, according to values of x. encode only works with strings. there
> must be an easy way to do this..... any help appreciated.
> goerge hoffman
> 
> 
> *
> *   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/

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index