Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: Drop Duplicates while simultaneously eliminating opposite positive and negative values


From   daniel klein <klein.daniel.81@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Drop Duplicates while simultaneously eliminating opposite positive and negative values
Date   Sun, 11 Nov 2012 12:30:57 +0100

Beatrice,

this is kind of confusing. You say, you want to

"[...] keep[ing] one observation if there are duplicates for all make,
price and mpg."

You then go on, specifying rules for cases in which

"there are 2 duplicated positive price values when there is one
opposite negative price value for the common make and mpg"

But this is impossible. Given the first step, which elimintates all
but one positive (or negative) price value in the subgroup defined by
make and mpg, there can no longer be any cases that have 2 (or more)
duplicated positive (or negative) price values in terms of make and
mpg.



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index