Statalist


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

st: RE: Poisson process to detect outliers


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Poisson process to detect outliers
Date   Fri, 15 May 2009 18:02:24 +0100

Sorry, but what has looking for values more than 3/2 IQR away from the nearer quartiles to do with a Poisson process? 

Nick 
n.j.cox@durham.ac.uk 

Katia Bobulova

anybody knows how to implement a Poisson process to detect outliers in Stata?

I tried to use this procedure (that I found in Stata FAQ) in order to
detect outliers:

sysuse auto, clear
sum mpg, detail
local u = r(p75) + (3/2) * (r(p75) - r(p25))
local l = r(p25) - (3/2) * (r(p75) - r(p25))
gen out = mpg<`l' | mpg>`u'
hist mpg          /*histogram including outlier*/
hist mpg if !out  /*histogram excluding outlier*

Is this the right procedure?

*
*   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   |   What's new   |   Site index