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

st: adding numerical value of -encode-ed value to label


From   Daniel Egan <dp.egan@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: adding numerical value of -encode-ed value to label
Date   Tue, 23 Nov 2004 16:32:53 -0500

Hello, 
I have a a variable that I am encoding, that takes on a large number of values. 

How would one go about hacking -encode- such that in the value labels
generated the numerical value is automatically added to the label,
i.e.

sysuse auto
encode make, gen(make2)
table make, c(m make2)

where make2's labels should have
1-  AMC Concord
2-  AMC Pacer

and so on...

Cheers, 

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