Statalist


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

Re: st: Assigning labels of 1 file into another file?


From   "Austin Nichols" <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Assigning labels of 1 file into another file?
Date   Wed, 12 Sep 2007 20:02:16 -0400

David Elliot--does this do what you want?
use data2
labmask code, val(desc)
keep code
merge code using data1, sort
(you can -findit labmask- to get the labutils I think)

On 9/12/07, David Elliott <dcelliott@gmail.com> wrote:
> I have a what is perhaps a related question.
>
> Imagine, as is frequently the case, we have a main file, eg:
> code measure1 measure2 ...
>
> with another cross-reference file containing:
> code description ...
>
> Such code cross-reference combinations are common when dumping from
> relational databases.
>
> Typically one might do a merge, but this can be a problem if the
> description is long and the main file is very large.  What one really
> wants is the cross-reference file to provide value labels to the main
> file.  This is both fast and parsimonious of space.  I looked for such
> a program without success so I wrote my own.  I would be interested if
> anyone knew of a user contributed program to do this, or if anyone
> else felt the need for such a program, in which case I might spruce it
> up for public consumption.
>
*
*   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