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

st: RE: encode with numeric or string values


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: encode with numeric or string values
Date   Fri, 11 Feb 2005 16:47:16 -0000

I can recall this being discussed but not 
the outcome. I think also that it is 
occasionally a user request at users' 
meetings, but never elicits much enthusiasm, 
a good reason for that being that extra 
machinery does not appear essential for the 
purposes people want. 

What seems clear is that Stata won't apply 
value labels to a string variable, so this 
boils down to setting up a correspondence 
(not necessarily one-to-one) between two 
string variables. 

Unless the number of "labels" was very 
small, the cleanest way of defining such 
labels might be via a definition data 
file which was then -merge-d with the 
main dataset. 

Nick 
n.j.cox@durham.ac.uk 

George M Hoffman MD
 
> i recall a discussion a few years ago about a command to 
> encode a variable 
> whether numeric or string, but cannot findit.
> any direction?

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