Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: Filtering data


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
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: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Maximiliano
Manuel Silva Correa
Sent: Dienstag, 29. Juni 2010 23:42
To: statalist@hsphsun2.harvard.edu
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index