Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: error message "label xxx already defined"
From
Richard Goldstein <[email protected]>
To
Xuelian Zhang <[email protected]>, statalist <[email protected]>
Subject
Re: st: error message "label xxx already defined"
Date
Tue, 10 Jul 2012 21:56:25 -0400
1. you really need to respond to statalist
2. how about value labels?
On 7/10/12 6:52 PM, Xuelian Zhang wrote:
> Dear Rich,
>
> Thank you for your quick response. I sent this email to your private
> account is because my email was bounced when I sent it to Statalist.
>
> Your explanation is quite helpful. But the problem is that I can't find
> any variable labeled as "xxx" in either the master or the using file. To
> be more specific, my using file only has two variables: personid
> (labeled as "personid") and h3cpl (labeled as "h3cpl:w3 whether couple
> household"). However, when I merged it to the master file, I got a
> warning message as "label CPL already defined". But none of the two
> variables in the using file has a label "CPL". Do you know the reason
> why I got such warning message?
>
> Thank you very much!
>
> Best,
> Xuelian
>
>
>
> On Tue, Jul 10, 2012 at 6:51 PM, Xuelian Zhang <[email protected]
> <mailto:[email protected]>> wrote:
>
> Dear Rich,
>
> Thank you for your quick response. I sent this email to your private
> account is because my email was bounced when I sent it to Statalist.
>
> Your explanation is quite helpful. But the problem is that I can't
> find any variable labeled as "xxx" in either the master or the using
> file.
>
> To be more specific, my using file only has two variables: personid
> (labeled as "personid") and h3cpl (labeled as "h3cpl:w3
> whether couple household"). However, when I merged it to the master
> file, I got a warning message as "label CPL already defined". But
> none of the two variables in the using file has a label "CPL". Do
> you know the reason why I got such warning message?
>
> Thank you very much!
>
> Best,
> Xuelian
>
> On Tue, Jul 10, 2012 at 1:11 PM, Richard Goldstein
> <[email protected] <mailto:[email protected]>> wrote:
>
> you are mis-reading the message from Stata; it is telling you that a
> label, not a variable, is already defined; in other words, each
> of the
> two files has a label with same name; just check that they are
> defined
> to be the same in the two files; if they are the same, then you can
> ignore the warning, not error, message
>
> Rich
>
> On 7/10/12 1:03 PM, xueliansharon wrote:
> > Dear all,
> >
> > I try to merge two files and always get an error message as
> "label xxx
> > already defined". What's more strange is that when I check the
> master and
> > using data file, I don't have the variable "xxx". Does anybody
> know the
> > reason for this?
> >
> > For your information, here are the commands and results:
> >
> > command:
> >
> > use "D:\work\aa.dta", clear
> > sort personid
> > merge 1:1 personid using "D:\work\bb.dta"
> >
> > result:
> > (label xxx already defined)
> >
> > command:
> > tab xxx
> >
> > result:
> > variable xxx not found
> >
> > Thank you very much for your time!
> >
> > Best,
> > Xuelian
*
* 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/