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: how to find out observations that id variables can't uniquely identify?
From
Pedro Nakashima <[email protected]>
To
[email protected]
Subject
Re: st: how to find out observations that id variables can't uniquely identify?
Date
Wed, 19 Oct 2011 13:21:56 -0200
by applno productno:gen contradiction= _N!=1
list if contradiction==1
2011/10/19 Pedro Nakashima <[email protected]>
>
> by applno productno:gen contradiction= _N!=1
>
> list if contradiction==1
>
> 2011/10/19 Steve Nakoneshny <[email protected]>
>>
>> Hi Nina,
>>
>> One way to easily identify your duplicates for further exploration would be to write -duplicates list applno productno-. This will simply list all records for which both of the listed variables are duplicated. If you wished to create a new indicator variable, -duplicates tag applno productno, gen(dup)- will do that.
>> Try -help duplicates- for more info.
>>
>>
>> On 2011-10-19, at 8:58 AM, Nina YIN wrote:
>>
>> > Dear all,
>> >
>> > I want to merge two large datasets, before I merge them, I checked
>> > whether id variables(applno productno) uniquely identify observations:
>> > "by applno productno:assert _N==1", it turns out "4 contradictions in
>> > 26586 by-groups ", then I want to figure out what's the problem with
>> > these 4 contradictions. However I don't know how to find out where
>> > they are? Do you have any suggestions? Thanks a lot!
>> >
>> >
>> >
>> > --
>> > Best Regards,
>> > Nina YIN
>> >
>> >
>> > Toulouse School of Economics
>> > Manufacture des Tabacs
>> > 21 Allee de Brienne
>> > Toulouse, 31000, France
>> > Tel: 0033-(0)5 6123 8348
>> > *
>> > * 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/
>>
>>
>> *
>> * 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/
>
*
* 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/