Statalist


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

Re: st: AW: drop multiple observations


From   Shehzad Ali <drshehzad_ali@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: AW: drop multiple observations
Date   Fri, 11 Dec 2009 07:56:02 -0800 (PST)

Thanks, Martin. Sorted!

Shehzad



----- Original Message ----
> From: Martin Weiss <martin.weiss1@gmx.de>
> To: statalist@hsphsun2.harvard.edu
> Sent: Fri, December 11, 2009 3:21:45 PM
> Subject: st: AW: drop multiple observations
> 
> 
> <> 
> 
> 
> 
> Also see NJC`s http://www.stata-journal.com/sjpdf.html?articlenum=dm0026 ,
> newly released by the "moving wall" at the SJ...
> 
> 
> HTH
> Martin
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Shehzad Ali
> Gesendet: Freitag, 11. Dezember 2009 16:21
> An: Stata List
> Betreff: st: drop multiple observations
> 
> Hi listers,
> 
> If I have a dataset with 1000 observations (uniquely identified using
> variable - id -), can I drop multiple observations using one line? I know
> one can drop observations that are say id>350 or <20, but if the
> observations are all over the place could we still use a one line command?
> 
> For example, instead of typing:
> 
> drop if id==2
> drop if id==215
> drop if id==302
> drop if id==420
> drop if id==579
> ...
> 
> Can I use one line to drop all the above?
> 
> Thank you,
> Shehzad
> 
> 
>       
> *
> *  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/



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