Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Richard Goldstein <richgold@ix.netcom.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: detecting repeated ID's |
Date | Mon, 05 Aug 2013 16:02:22 -0400 |
how about: sort ID drop if ID!=ID[_n-1] & ID!=ID[_n+1] Rich On 8/5/13 3:45 PM, David Jones wrote: > Hi Statalist, > > I have a dataset of property sales that has an identifier for the > property ID. I want to know how many of the properties appear more > than once and then from there I'd like to restrict the observations to > only those that appear more than once (to see a change in sale value). > > I've been doing some reading but so far haven't run across a way to do > this very easily. Does anyone have any suggestions? > > Thanks! > David * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/