Bookmark and Share

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: drop duplicates within variable with -by- option


From   TA Stat <[email protected]>
To   [email protected]
Subject   Re: st: drop duplicates within variable with -by- option
Date   Tue, 17 May 2011 20:54:18 +0700

"by" command is not allowed to use with "duplicates" but use both "ID"
and "another variable" (or other variables) to look for duplicates.
That means you are looking for any duplicates of X1 (e.g. height)
within X2 (e.g. class).  It is like a conditional criteria by
searching ID first, then another variable.

Peter

On Mon, May 16, 2011 at 9:36 PM, David Torres <[email protected]> wrote:
> I have data in long format and need to drop duplicate observations within a
> variable by ID.  I've looked at the -duplicates- command and it doesn't seem
> to help me get what I want.
>
> Thanks,
> Diego
> *
> *   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index