Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: label wide format variables with same label for different years


From   <I.Roland@lse.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: label wide format variables with same label for different years
Date   Tue, 18 Jun 2013 11:52:21 +0100

Dear Statalisters,

My data is in wide format and I would like to give the same label to several variables in different years.

Example: 

income_2013       income_2012
10                             8

I want to label both income_2013 and income_2012 as "income". Since I have many years, I am looking for a way of doing this with one command line instead of

label variable income_2013 "income"
label variable income_2012 "income"

I intuitively tried

label variable income_* "income" but this does not work, and I could not find an answer online.

Thank you for your help with this!
Isa

Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index