Click or drag to resize
ARMAOutlierIdentification Class
Detects and determines outliers and simultaneously estimates the model parameters in a time series whose underlying outlier free series follows a general seasonal or nonseasonal ARMA model. This class also allows computation of forecasts.
Inheritance Hierarchy
SystemObject
  Imsl.StatARMAOutlierIdentification

Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
[SerializableAttribute]
public class ARMAOutlierIdentification

The ARMAOutlierIdentification type exposes the following members.

Constructors
  NameDescription
Public methodARMAOutlierIdentification
Constructor for ARMAOutlierIdentification.
Top
Methods
  NameDescription
Public methodCompute
Detects and determines outliers and simultaneously estimates the model parameters for the given time series.
Public methodComputeForecasts
Computes forecasts, associated probability limits and \psi weights for an outlier contaminated time series whose underlying outlier free series obeys a general seasonal or non-seasonal ARMA model.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAR
Returns the final autoregressive parameter estimates.
Public methodGetDeviations
Returns the deviations used for calculating the forecast confidence limits.
Public methodGetForecast
Returns forecasts for the original outlier contaminated series.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetMA
Returns the final moving average parameter estimates.
Public methodGetOmegaWeights
Returns the \omega weights for the detected outliers.
Public methodGetOutlierFreeForecast
Returns forecasts for the outlier free series.
Public methodGetOutlierFreeSeries
Returns the outlier free series.
Public methodGetOutlierStatistics
Returns the outlier statistics.
Public methodGetPsiWeights
Returns the \psi weights of the infinite order moving average form of the model.
Public methodGetResidual
Returns the residuals.
Public methodGetTauStatistics
Returns the t value for each detected outlier.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldStatic memberADDITIVE
Indicates detection of an additive outlier.
Public fieldStatic memberINNOVATIONAL
Indicates detection of an innovational outlier.
Public fieldStatic memberLEVEL_SHIFT
Indicates detection of a level shift outlier.
Public fieldStatic memberTEMPORARY_CHANGE
Indicates detection of a temporary change outlier.
Public fieldStatic memberUNABLE_TO_IDENTIFY
Indicates detection of an outlier that cannnot be categorized.
Top
Properties
  NameDescription
Public propertyAccuracyTolerance
The tolerance value controlling the accuracy of the parameter estimates.
Public propertyAIC
Returns Akaike's information criterion (AIC).
Public propertyAICC
Returns Akaike's Corrected Information Criterion (AICC).
Public propertyBIC
Returns the Bayesian Information Criterion (BIC).
Public propertyConfidence
The confidence level for calculating confidence limit deviations via method GetDeviations.
Public propertyConstant
Returns the constant parameter estimate.
Public propertyCriticalValue
The critical value used as a threshold during outlier detection.
Public propertyDelta
The dampening effect parameter.
Public propertyNumberOfOutliers
Returns the number of outliers detected.
Public propertyRelativeError
The stopping criterion for use in the nonlinear equation solver.
Public propertyResidualStandardError
Returns the residual standard error of the outlier free series.
Top
Remarks

Consider a univariate time series \{Y_t\} that can be described by the following multiplicative seasonal ARIMA model of order (p,0,q) \times (0,d,0)_s:


            Y_t - \mu = \frac{\theta(B)}{\Delta_s^d \phi(B)} a_t,\, t = 1,\ldots,n
Here, \Delta_s^d=(1-B^s)^d,\, \theta(B)=1-\theta_1B-\ldots-\theta_qB^q,\, \phi(B)=1-\phi_1B-\ldots-\phi_pB^p. B is the lag operator, B^kY_t=Y_{t-k}, \{a_t\} is a white noise process, and \mu denotes the mean of the series \{Y_t\}.

Outlier detection and parameter estimation

In general, \{Y_t\} is not directly observable due to the influence of outliers. Chen and Liu (1993) distinguish between four types of outliers: innovational outliers (IO), additive outliers (AO), temporary changes (TC) and level shifts (LS). If an outlier occurs as the last observation of the series, then Chen and Liu's algorithm is unable to determine the outlier's classification. In class ARMAOutlierIdentification, such an outlier is called a UI (unable to identify) and is treated as an innovational outlier.

In order to take the effects of multiple outliers occurring at time points t_1,\ldots,t_m into account, Chen and Liu consider the following model:


            Y_t^\ast - \mu = \sum_{j=1}^m\omega_jL_j(B)I_t(t_j)+\frac{\theta(B)}{\Delta_s^d\phi(B)}a_t
Here, \{Y_t^\ast\} is the observed outlier contaminated series, and \omega_j and L_j(B) denote the magnitude and dynamic pattern of outlier j, respectively. I_t(t_j) is an indicator function that determines the temporal course of the outlier effect, I_{t_j}(t_j)=1, I_t(t_j)=0 otherwise. Note that L_j(B) operates on I_t via B^kI_t=I_{t-k}, \, k=0,1,\ldots.

The last formula shows that the outlier free series \{Y_t\} can be obtained from the original series \{Y_t^\ast\} by removing all occurring outlier effects:


            Y_t = Y_t^\ast-\sum_{j=1}^m\omega_jL_j(B)I_t(t_j)
The different types of outliers are characterized by different values for L_j(B):

  1. L_j(B)=\frac{\theta(B)}{\Delta_s^d\phi(B)} for an innovational outlier,
  2. L_j(B)=1 for an additive outlier,
  3. L_j(B)=(1-B)^{-1} for a level shift outlier and
  4. L_j(B)=(1-\delta B)^{-1},\, 0 \lt \delta \lt 1, for a temporary change outlier.

Class ARMAOutlierIdentification is an implementation of Chen and Liu's algorithm. It determines the coefficients in \phi(B) and \theta(B) and the outlier effects in the model for the observed series jointly in three stages. The magnitude of the outlier effects is determined by least squares estimates. Outlier detection itself is realized by examination of the maximum value of the standardized statistics of the outlier effects. For a detailed description, see Chen and Liu's original paper (1993).

Intermediate and final estimates for the coefficients in \phi(B) and \theta(B) are computed by the Compute methods from classes ARMA and ARMAMaxLikelihood. If the roots of \phi(B) or \theta(B) lie on or within the unit circle, then the algorithm stops with an appropriate exception. In this case, different values for p and q should be tried.

Forecasting

From the relation between original and outlier free series,


            Y_t^\ast = Y_t+\sum_{j=1}^m\omega_jL_j(B)I_t(t_j)
it follows that the Box-Jenkins forecast at origin t for lead time l, \hat{Y}_t^\ast(l), can be computed as

            \hat{Y}_t^\ast(l) = \hat{Y}_t(l)+\sum_{j=1}^m \omega_jL_j(B)I_{t+l}(t_j)  ,\; l=1,\ldots,{\rm{nForecast}}
Therefore, computation of the forecasts for \{Y^\ast_t\} is done in two steps:
  1. Computation of the forecasts for the outlier free series \{Y_t\}.
  2. Computation of the forecasts for the original series \{Y^\ast_t\} by adding the multiple outlier effects to the forecasts for \{Y_t\}.

Step 1: Computation of the forecasts for the outlier free series \{Y_t\}

Since


            \varphi(B)(Y_t-\mu) = \theta(B)a_t
where

            \varphi(B):=\Delta_s^d\phi(B)=1-\varphi_1B-\ldots-\varphi_{p+sd}B^{p+sd}
the Box-Jenkins forecast at origin t for lead time l, \hat{Y}_t(l), can be computed recursively as

            \hat{Y}_t(l)=(1-\sum_{j=1}^{p+sd}\varphi_j)\mu+\sum_{j=1}^{p+sd}\varphi_j\hat{Y}_t(l-j)-\sum_{j=1}^q\theta_ja_{t+l-j}
Here,

            \hat{Y}_t(l-j)= \left\{ \begin{array}{ccc}
            Y_{t+l-j} & {\mbox{for}} & l-j \le 0 \\
            \hat{Y}_t(l-j) & {\mbox{for}} & l-j \gt 0
            \end{array}
            \right.
and

            a_k = \left\{ \begin{array}{ccc}
            0 & {\mbox{for}} & k \le \max\{1, p+sd\} \\
            Y_k-\hat{Y}_{k-1}(1) & {\mbox{for}} & k = \max\{1, p+sd\}+1,\ldots,n
            \end{array}
            \right.

Step 2: Computation of the forecasts for the original series \{{Y_t}^*\} by adding the multiple outlier effects to the forecasts for \{Y_t\}

The formulas for L_j(B) for the different types of outliers are as follows:

Innovational outlier (IO)


            L_j(B) = \frac{\theta(B)}{\Delta_s^d\phi(B)}:=\psi(B)=\sum_{k=0}^\infty\psi_kB^k,\, \psi_0=1

Additive outliers (AO)


            L_j(B) = 1

Level shifts (LS)


            L_j(B) = \frac{1}{1-B}=\sum_{k=0}^{\infty}B^k

Temporary changes (TC)


            L_j(B) = \frac{1}{1-\delta B}=\sum_{k=0}^\infty\delta^kB^k
Assuming the outlier occurs at time point t_j, the outlier impact is therefore:

Innovational outliers (IO)


            \omega_jL_j(B)I_t(t_j) = \left\{ \begin{array}{ccc}
            0 & {\mbox{for}} &  t \lt t_j \\
            \omega_j \psi_k & {\mbox{for}} & t=t_j+k, \, k \ge 0
            \end{array}
            \right.

Additive outliers (AO)


            \omega_jL_j(B)I_t(t_j) = \left\{ \begin{array}{ccc}
            0 & {\mbox{for}} &  t \ne t_j \\
            \omega_j & {\mbox{for}} & t=t_j
            \end{array}
            \right.

Level shifts (LS)


            \omega_jL_j(B)I_t(t_j) = \left\{ \begin{array}{ccc}
            0 & {\mbox{for}} &  t \lt t_j \\
            \omega_j & {\mbox{for}} &  t=t_j+k, \, k \ge 0
            \end{array}
            \right.

Temporary changes (TC)


            \omega_jL_j(B)I_t(t_j) = \left\{ \begin{array}{ccc}
            0 & {\mbox{for}} &  t \lt t_j \\
            \omega_j \delta^k & {\mbox{for}} & t=t_j+k, \, k \ge 0
            \end{array}
            \right.
From these formulas, the forecasts \hat{Y}_t^\ast(l) can be computed easily. The 100(1-\alpha) percent probability limits for Y_{t+l}^\ast and Y_{t+l} are given by

            \hat{Y}_t^\ast(l)\, {\rm{(or }}\,\,\, \hat{Y}_t(l) {\rm{, resp.)}} \pm u_{\alpha/2}(1+\sum_{j=1}^{l-1}\psi_j^2)^{1/2}s_a
where u_{\alpha/2} is the 100(1-\alpha/2) percentile of the standard normal distribution, s_a^2 is an estimate of the variance \sigma_a^2 of the random shocks, and the \psi weights \{\psi_j\} are the coefficients in

            \psi(B) := \sum_{k=0}^\infty \psi_k B^k := \frac{\theta(B)}{\Delta_s^d\phi(B)}, \, \psi_0=1 \,.
For a detailed explanation of these concepts, see chapter 5:"Forecasting" in Box, Jenkins and Reinsel (1994).
See Also