This is the purpose of -numlabel-, in official Stata for a couple
of versions now.
Nick
[email protected]
Mike Lacy
I often find I would like a simple oneway tabulation that shows both
the numeric codes and the labels for a variable, not just or the
other. This is quite useful before and after a recode, for example.
I'm thinking of something like the following mocked-up trivial
example, in which 0 and 1 as well as "foreign" and "domestic" show up
in the tabulation:
Car type | Freq. Percent
------------+--------------------------
Domestic 0 | 52 70.27
Foreign 1 | 22 29.73
------------+--------------------------
Total | 74 100.00
For some time I was convinced an answer to this question must lie
somewhere in the archives, but I must not have hit the right
combination of keywords if it is. Since I gather there is no built-in
solution, could someone at least sketch how to make a program to
obtain the value label associated with a given variable, and display
that info. in a nice way?
*
* 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/