Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Selay Sahan <selays@outlook.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | st: omitting outliers |
Date | Mon, 16 Dec 2013 21:33:50 +0200 |
Dear Statalisters, In order to find and omit the outliers from the data, I used the code below: sort nace by nace: lv mpg by nace: keep if inrange(mpg,r(l_F)-(1.5*(r(u_F) - r(l_F))) ,r(u_F)+(1.5*(r(u_F) - r(l_F)))) However, although Stata finds the outliers, it does not drop them from the sample. ((I tried the code with simpler data sets. It worked well, i.e. the outliers were found and dropped from the sample)) Does anyone know why Stata does not drop the outliers although it is able to find them? What may be wrong with my data set? (The code is working, as I've said I checked it with other smaller data sets) Any help will be greatly appreciated. Thank you in advance. Selay * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/