Statalist The Stata Listserver

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

st: AW: Labeling variables

From   "Thomas Erdmann" <>
To   <>
Subject   st: AW: Labeling variables
Date   Wed, 15 Nov 2006 13:08:52 +0100

Sorry, a single loop will do I guess...

foreach X of varlist n* {
  =09label variable `X' `X'

- Tom

-----Urspr=FCngliche Nachricht-----
Von: Thomas Erdmann []
Gesendet: Mittwoch, 15. November 2006 12:51
An: ''
Betreff: Labeling variables


Is there a command that tells Stata to set the label of each variable to th=
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:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index