Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: adding variable name to value label


From   "Song, Lin" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: adding variable name to value label
Date   Thu, 26 Sep 2013 16:37:00 +0000

Hi Stata users:

I'd like to add variable names to value labels.  For example, I have the following variables:

Q1: 1=yes, 2=no
Q2: 1=male, 2=female

I'd like to convert the value labels to something like below:

Q1: 1="Q1-yes" 2="Q1-no"
Q2: 1="Q2-male" 2 "Q2-female"

This is for matching two files generated by tabout.  Because of zero count for certain values, the two files cannot be matched sequentially.

Is there a simple way to do this?

Thanks a lot.

Lin
Lin Song
Epidemiologist
Public Health - Seattle & King County
(206) 263-8773


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index