Hello
I have a program that labels some tables of STATA output with variable names based on a varlist
I can extract the value label from var `v' using:
and then get the label list using:
which gives me some output like this (for variable race as an example)
I want to be able to get the string of the label based on the number which corresponds to the label - eg some command that if I know that race = 2, I get "Black" out from the race_ value label. I cant seem to figure out how to do this. Any help would be appreciated.
thanks for the help
hpw
I have a program that labels some tables of STATA output with variable names based on a varlist
I can extract the value label from var `v' using:
Code:
local labval : value label `v'
Code:
label list `labval'
Code:
race_:
-1 Unknown
1 White
2 Black
3 Asian
4 Pacific Islands
5 Native American
6 Other
thanks for the help
hpw

Comment