Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: RE: Filtering data

From   "Martin Weiss" <>
To   <>
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.


-----Original Message-----
[] On Behalf Of Maximiliano
Manuel Silva Correa
Sent: Dienstag, 29. Juni 2010 23:42
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

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.

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index