Statalist


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

st: Poisson process to detect outliers


From   Katia Bobulova <[email protected]>
To   [email protected]
Subject   st: Poisson process to detect outliers
Date   Fri, 15 May 2009 17:55:42 +0100

Dear All,

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?

Thank you very much

Katia
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index