Statalist


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

Re: st: Importing variable and value labels from txt file


From   "Eva Poen" <eva.poen@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Importing variable and value labels from txt file
Date   Tue, 20 May 2008 14:39:08 +0100

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

2008/5/20 Guillermo Villa <guillermo@baphealth.com>:
> Dear Statalisters,
>
> I would like to know whether, for an active dataset, Stata is able to
> attach value and/or variable labels from an existing txt file. In that
> case, how should that text file be structured and which Stata commands
> should be used?
>
> Thanks.
>
> Guillermo
> *
> *   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/
>
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index