Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Re: deleting duplicate observations


From   Daniel Müller <d.mueller@agr.uni-goettingen.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Re: deleting duplicate observations
Date   Tue, 8 Oct 2002 09:56:27 +0200

collapse var1 var2, by(HHID)

Daniel

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of mili
> Sent: Tuesday, October 08, 2002 9:41 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Re: deleting duplicate observations
> 
> 
> you could type
> drop if hhid == hhid[_n-1]
> mili
> ----- Original Message ----- 
> From: "Kompal Sinha" <kompal.sinha@anu.edu.au>
> To: <statalist@hsphsun2.harvard.edu>
> Sent: Monday, October 07, 2002 11:37 PM
> Subject: st: deleting duplicate observations
> 
> 
> > I have household level data in following format:
> > HHID var1 var2
> > 1     5    6
> > 1     5    6
> > 1     5    6
> > 2     5    7
> > 2     5    7
> > 4     9    6
> > 
> > I want it in the following format now:
> > HHID var1 var2
> > 1     5    6
> > 2     5    7
> > 4     9    6
> > 
> > How can I retain observations with unique HHID????
> > 
> > Thanks in advance
> > Kompal
> > *
> > *   For searches and help try:
> > *   http://www.stata.com/support/faqs/res/findit.html
> > *   http://www.stata.com/support/statalist/faq
> > *   http://www.ats.ucla.edu/stat/stata/
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 
> 
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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