Statalist


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

st: Importing variable labels and notes


From   "Brian Karfunkel" <[email protected]>
To   [email protected]
Subject   st: Importing variable labels and notes
Date   Tue, 22 Jul 2008 13:42:08 -0700

Hello,

I am wondering if there is a way to "merge" variable labels and notes
from an external file (e.g. a csv or dta).

In other words if my data looks like:

age | inc | educ |
------------------
43  | 14.3|    12|
24  | 38.2|    18|
...

And I want to, effectively, do the following:
lab var age "Age"
notes age "In years"
lab var inc "Income"
notes inc "Measured in thousands of dollars (yr 2000)"
etc.

But I want to use an external table I made that looks like this:
Variable  | Label   |  Note  |
-----------------------------
age       | Age      |  In years   |
inc       | Income   |  Measured in thousands...
educ      | Education | Measured in years of ed...

Is there a way to do this in Stata? Also, is there a way to rename
variables or label values in a similar way?

Thanks for any help you can provide.

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



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