Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Merge with "value labels" of same name but differnet contents


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Merge with "value labels" of same name but differnet contents
Date   Tue, 12 Oct 2004 10:35:52 +0100

My guess is that it is much easier to deal with this 
upstream by fixing the labels first. Even a complicated 
set of labels can be copied fairly easily using 
-labvalclone- from -labutil- on SSC, after which 
you can -drop- one of the clashing pair. 

Nick 
n.j.cox@durham.ac.uk 

Jens Lauritsen
 
> I tried to find an ado for merging datasets to handle the 
> situation that 
> the files have the same names for value label definitions but 
> the contents 
> were different.
> e.g.
> dataset one: label v1  is: 1 yes 2 no applied to variable d1
> dateset two: label v1 is : 1 small 2 medium 3 large applied 
> to variable s1
> 
> When merging data either d1 or s1 gets wrong labels.
> Any suggestions apart from going back to the definition in 
> the old files 
> and renaming there ? (before I write an ado to handle this).
> 

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