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]
Re: st: RE: Filtering data
From
Maximiliano Manuel Silva Correa <[email protected]>
To
[email protected]
Subject
Re: st: RE: Filtering data
Date
Tue, 29 Jun 2010 18:03:04 -0400
Thank you Martin.
My data is something like
date route_code start_time end_time travel_time
Id like to do something like
by route_code: drop if travel_time > p90 | travel_time < p10
How is the sintaxis for that?
Thank you in advance,
Max
2010/6/29 Martin Weiss <[email protected]>:
>
> <>
>
> 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/
>
*
* 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/