Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: How can I obtain the name of a variable's value label programatically?


From   "K Jensen" <[email protected]>
To   [email protected]
Subject   st: How can I obtain the name of a variable's value label programatically?
Date   Wed, 20 Feb 2008 14:00:45 +0000

Hi
I would like to obtain the name of a variable's value label
programatically within  a loop.
For example:
. sysuse auto
(1978 Automobile Data)

. d foreign

              storage  display     value
variable name   type   format      label      variable label
-------------------------------------------------------------------------------
foreign         byte   %8.0g       origin     Car type

How can I create a local macro containing the variable's value label,
i.e. "origin"?

Thankyou
Karin
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index