Hello R users, Can someone tell if there is a package in R that can do outlier detection that give outputs simiilar to what I got from SAS below. Many thanks in advance for any help! Outlier Details Approx Chi- Prob> Obs Time ID Type Estimate Square ChiSq 12 12.000000 Additive 2792544.6 186.13 <.0001 13 13.000000 Additive 954302.1 21.23 <.0001 15 15.000000 Shift 63539.3 9.06 0.0026 -- View this message in context: http://www.nabble.com/Outlier-Detection-for-timeseries-tp22008448p22008448.html Sent from the R help mailing list archive at Nabble.com.
what are you looking for? I am not familiar with SAS as I am a poor scientist. I am not promising anything, but if you were to tell me what you wanted - method etc. I may know of a package or something that would work. Stephen On Fri, Feb 13, 2009 at 9:16 PM, Pele <drdionc at yahoo.com> wrote:> > Hello R users, > > Can someone tell if there is a package in R that can do outlier detection > that give outputs simiilar to what I got from SAS below. > > Many thanks in advance for any help! > > Outlier Details > > Approx > Chi- > Prob> > Obs Time ID Type Estimate Square > ChiSq > > 12 12.000000 Additive 2792544.6 186.13 > <.0001 > 13 13.000000 Additive 954302.1 21.23 > <.0001 > 15 15.000000 Shift 63539.3 > 9.06 0.0026 > > -- > View this message in context: http://www.nabble.com/Outlier-Detection-for-timeseries-tp22008448p22008448.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Stephen Sefick Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis
Hi Stephen, I am doing cross correlation analysis and I am trying to find a outlier detection function in R that can detect changes in the level of the response series that are not accounted for by the estimated model. Something that tells whether the changes are considered Additive Outliers, Level Shifts, or Temporary Changes... The output in the original not is what SAS produces and I was looking for something similar.. R is very new to me (4 weeks) hence still feeling my way around... Many thanks! Pele wrote:> > Hello R users, > > Can someone tell if there is a package in R that can do outlier detection > that give outputs simiilar to what I got from SAS below. > > Many thanks in advance for any help! > > Outlier Details > > Approx > > Chi- Prob> > Obs Time ID Type Estimate > Square ChiSq > > 12 12.000000 Additive 2792544.6 > 186.13 <.0001 > 13 13.000000 Additive 954302.1 > 21.23 <.0001 > 15 15.000000 Shift 63539.3 > 9.06 0.0026 > >-- View this message in context: http://www.nabble.com/Outlier-Detection-for-timeseries-tp22008448p22012539.html Sent from the R help mailing list archive at Nabble.com.
Pele <drdionc <at> yahoo.com> writes:> > > Hello R users, > > Can someone tell if there is a package in R that can do outlier detection > that give outputs simiilar to what I got from SAS below. > > Many thanks in advance for any help!I guess you are talking about the OUTLIER procedure in SAS that attempts to detect 'additive outliers' and 'level shifts' in a 'response' series, the second following Jong & Penzer's "Diagnosing shocks in time series". I have not come across this method in R, but you might have a look into the 'robfilter' (Robust Time Series Filters) package with functions like 'dw.filter', 'adore.filter', or 'wrm.filter', see for instance "dw.filter is suitable for extracting low frequency components (the signal) from a time series which may be contaminated with outliers and can contain level shifts. For this, moving window techniques are applied." If your time series is actually a response, you might prefer to look at the series of residuals instead.> Outlier Details > > Approx > Chi- > Prob> > Obs Time ID Type Estimate Square > ChiSq > > 12 12.000000 Additive 2792544.6 186.13 > <.0001 > 13 13.000000 Additive 954302.1 21.23 > <.0001 > 15 15.000000 Shift 63539.3 > 9.06 0.0026 >
Check out the Tramo Seats and Gretl packages. These are not R packages but are free. The first one has outlier detection and the second has interfaces to both Tramo Seats and R which may or may not allow you to access Tramo Seats indirectly from R. On Sat, Feb 14, 2009 at 8:15 AM, Pele <drdionc at yahoo.com> wrote:> > Hi Stephen, > > I am doing cross correlation analysis and I am trying to find a outlier > detection function in R that can detect changes in the level of the response > series that are not accounted for by the estimated model. Something that > tells whether the changes are considered Additive Outliers, Level Shifts, or > Temporary Changes... The output in the original not is what SAS produces and > I was looking for something similar.. R is very new to me (4 weeks) hence > still feeling my way around... > > Many thanks! > > > > Pele wrote: >> >> Hello R users, >> >> Can someone tell if there is a package in R that can do outlier detection >> that give outputs simiilar to what I got from SAS below. >> >> Many thanks in advance for any help! >> >> Outlier Details >> >> Approx >> >> Chi- Prob> >> Obs Time ID Type Estimate >> Square ChiSq >> >> 12 12.000000 Additive 2792544.6 >> 186.13 <.0001 >> 13 13.000000 Additive 954302.1 >> 21.23 <.0001 >> 15 15.000000 Shift 63539.3 >> 9.06 0.0026 >> >> > > -- > View this message in context: http://www.nabble.com/Outlier-Detection-for-timeseries-tp22008448p22012539.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Doug Martin et al ( he may not be the first author ) has a book called Robust Regression and I vaguely recall seeing a chapter in there related to outlier detection. in time series. Given that there's an S+ package associated with the book, maybe that package has been or can be translated to R and can then be used for what the person is asking. All this is guesswork but maybe worth looking into. The book may also include the various scripts at a website but I don''t have the book in front of me to check that. On Sat, Feb 14, 2009 at 10:27 AM, Gabor Grothendieck wrote:> Check out the Tramo Seats and Gretl packages. These are not > R packages but are free. The first one has outlier detection > and the second has interfaces to both Tramo Seats and R which may > or may not allow you to access Tramo Seats indirectly from R. > > On Sat, Feb 14, 2009 at 8:15 AM, Pele <drdionc at yahoo.com> wrote: >> >> Hi Stephen, >> >> I am doing cross correlation analysis and I am trying to find a >> outlier >> detection function in R that can detect changes in the level of the >> response >> series that are not accounted for by the estimated model. Something >> that >> tells whether the changes are considered Additive Outliers, Level >> Shifts, or >> Temporary Changes... The output in the original not is what SAS >> produces and >> I was looking for something similar.. R is very new to me (4 weeks) >> hence >> still feeling my way around... >> >> Many thanks! >> >> >> >> Pele wrote: >>> >>> Hello R users, >>> >>> Can someone tell if there is a package in R that can do outlier >>> detection >>> that give outputs simiilar to what I got from SAS below. >>> >>> Many thanks in advance for any help! >>> >>> Outlier Details >>> >>> Approx >>> >>> Chi- Prob> >>> Obs Time ID Type Estimate >>> Square ChiSq >>> >>> 12 12.000000 Additive 2792544.6 >>> 186.13 <.0001 >>> 13 13.000000 Additive 954302.1 >>> 21.23 <.0001 >>> 15 15.000000 Shift 63539.3 >>> 9.06 0.0026 >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Outlier-Detection-for-timeseries-tp22008448p22012539.html >> Sent from the R help mailing list archive at Nabble.com. >> >> ______________________________________________ >> R-help at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Danger: More careful thought required. "Outlier....s" (Title of a TECHNOMETRICS paper of a couple of decades ago) are an artificial construct: there is NO SUCH THING in the abstract. They exist only wrt to a model. So there is no such thing as software that "tells whether the changes are considered ...". Rather, you must consider alternative "suitable" models, examine their fits, scientific implications, interpretation, etc. Frequently, several models will fit essentially equally well, but different subsets of the data will appear "unusual" (I no longer use the word "outlier" because of the intimation that there is an objective statistical meaning to this term, which there is not) for each. Statistical algorithms cannot replace careful thinking. Sorry about that. -- Bert Gunter Genentech -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Pele Sent: Saturday, February 14, 2009 5:16 AM To: r-help at r-project.org Subject: Re: [R] Outlier Detection for timeseries Hi Stephen, I am doing cross correlation analysis and I am trying to find a outlier detection function in R that can detect changes in the level of the response series that are not accounted for by the estimated model. Something that tells whether the changes are considered Additive Outliers, Level Shifts, or Temporary Changes... The output in the original not is what SAS produces and I was looking for something similar.. R is very new to me (4 weeks) hence still feeling my way around... Many thanks! Pele wrote:> > Hello R users, > > Can someone tell if there is a package in R that can do outlier detection > that give outputs simiilar to what I got from SAS below. > > Many thanks in advance for any help! > > Outlier Details >> Approx > > Chi- Prob> > Obs Time ID Type Estimate > Square ChiSq > > 12 12.000000 Additive 2792544.6 > 186.13 <.0001 > 13 13.000000 Additive 954302.1 > 21.23 <.0001 > 15 15.000000 Shift 63539.3 > 9.06 0.0026 > >-- View this message in context: http://www.nabble.com/Outlier-Detection-for-timeseries-tp22008448p22012539.h tml Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.