[R] Outlier Detection for timeseries
Hans W. Borchers
hwborchers at gmail.com
Sat Feb 14 14:20:21 CET 2009
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
>
More information about the R-help
mailing list