Statalist


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

st: Importing variable and value labels from txt file


From   "Guillermo Villa" <[email protected]>
To   [email protected]
Subject   st: Importing variable and value labels from txt file
Date   Tue, 20 May 2008 16:54:07 +0200

Dear Eva,

Label information comes from an online application and it is separated
from the dataset. We want to combine labels and data, and will be
doing it repeatedly.

We are trying to build a dataset matching variable names (in a column)
and variable labels, and do something similar with value labels. In
that sense, Martin Weiss message has been very helpful, since I think
we will be able to build a dataset similar to the one provided by
Stata's descsave command, but this will also require writing a proper
do file for matching, which is time-consuming.

I would appreciate it if you could tell me more on your previous
experience with Access tables, the format they should display, and the
code you employed to match data and labels in Stata.

Thank you for your help.

Guillermo

As far as I know, the only way in which Stata can define and apply
labels is via the -label define-, -label values- and -label variable-
commands. From what you say it's difficult to see what your ultimate
goal is. Do you have label information that is stored separatedly from
the dataset, and you are looking for the most efficient way of
combining the two? Are you going to have to do this not once but
repeatedly? What format is this information in now?

I've done something similar to this in the past, with value label and
variable label information stored in Access tables. It's quite easy to
read this information into Stata, loop over the observations and
create the -label- statements from that. What is best for you really
depends on the complexity and the setup. People on the list will need
more information to help.

Eva
*
*   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/



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