Sorry, a single loop will do I guess...
foreach X of varlist n* {
=09label variable `X' `X'
=09}
- Tom
-----Urspr=FCngliche Nachricht-----
Von: Thomas Erdmann [mailto:[email protected]]
Gesendet: Mittwoch, 15. November 2006 12:51
An: '[email protected]'
Betreff: Labeling variables
Hi,
Is there a command that tells Stata to set the label of each variable to th=
e
variable name?
Or, alternatively, loading my file with -insheet- , can I tell Stata that
one row (using long data) contains the information for the variable labels?
Details: I have data in the long form, the column headers are detailed
descriptions of the items. Basically I would like to use those names as
labels and then rename the variables to shorter names directly in Stata, to
avoid errors in this process:
Pretty easy problem I guess, but only found more complicated alternatives
and no straightforward solution, thanks for your feedback.
- Tom
*
* 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/