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]

st: RE: Filtering data


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: Filtering data
Date   Tue, 29 Jun 2010 23:47:29 +0200

<>

We cannot possibly know the true structure of your data, but to show the
mechanics of -drop-ping:

*************
sysuse auto, clear
summarize weight, d
drop if weight< `r(p10)' | (weight > `r(p90)' & !mi(weight))
*************


Most of the time, you do not need to -drop- outright, just condition via the
-if- qualifier.


HTH
Martin

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Maximiliano
Manuel Silva Correa
Sent: Dienstag, 29. Juni 2010 23:42
To: [email protected]
Subject: st: Filtering data

Dear Stata community,

Im currently analizing travel times for serveral urban bus trips in
the city of Santiago, Chile. I'm using lots of data coming from GPS
sources.

Pretty newbie to Stata,  Im stuck trying to filter data by bus trip
route codes; Id like to drop all observations wich have travel times
under percentile 10 and over percentile 90 for all observations
sharing a certain route code... this filter for all route codes.

How could I do this?

Thank you in advance.

Max
*
*   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