Computes forecasts, associated probability limits and Ψ weights for an outlier contaminated time series.
Required Arguments
W — Array of length NOBS containing the outlier free time series. (Input)
RESIDUAL — Array of length NOBS containing the residuals of the outlier free time series determined from routine TS_OUTLIER_IDENTIFICATION. (Input)
NOUTLIERS — The number of outliers in W, determined from routine TS_OUTLIER_IDENTIFICATION. (Input)
IOUTLIERSTATS — Array of size NOUTLIERS by 2 containing outlier statistics from routine TS_OUTLIER_IDENTIFICATION. (Input). The first column contains the time at which the outlier was observed () and the second column contains an identifier indicating the type of outlier observed. Outlier types fall into one of five categories:
IOUTLIERSTATS
Category
0
Innovational Outliers (IO)
1
Additive Outliers (AO)
2
Level Shift Outliers (LS)
3
Temporary Change Outliers (TC)
4
Unable to Identify (UI)
If NOUTLIERS = 0 this array is ignored.
OMEGA — Array of length NOUTLIERS containing the omega weights for the outliers determined through routine TS_OUTLIER_IDENTIFICATION. (Input)
DELTA — The dynamic dampening effect parameter used in the outlier detection, 0.0 < DELTA < 1.0. (Input)
MODEL — Array of length four containing estimates for p, q, s and d in MODEL(1), MODEL(2), MODEL(3) and MODEL(4), respectively. (Input)
PARAMS — Array of length 1+p+q containing the estimated constant, AR and MA parameters as output from routine TS_OUTLIER_IDENTIFICATION. (Input)
MXLEAD — Maximum lead time for forecasts. (Input) The forecasts are taken at origin , the time point of the last observed value in the series, for lead times 1, 2,…, MXLEAD. MXLEAD must be greater than zero.
FCST — An array of size MXLEAD by 3 containing the forecasted values for the outlier contaminated series in the first column. The second column contains the deviations from each forecast that give the 100(1‑ALPHA)% probability limits, and the third column contains the weights of the infinite order moving average form of the model. (Output)
Optional Arguments
NOBS — Number of observations in the time series W. (Input) Default: NOBS = size (W).
ALPHA — Value in the exclusive interval (0,1) used to specify the 100(1‑ALPHA)% probability limits of the forecast. (Input) Default: ALPHA = 0.05
OUTFREEFCST — An MXLEAD by 3 array containing the forecasted values for the original outlier free series in the first column. The second column contains standard errors for these forecasts, and the third column contains the weights of the infinite order moving average form of the model. (Output)
Specific: The specific interface names are S_TS_OUTLIER_FORECAST and D_TS_OUTLIER_FORECAST.
Description
Consider the following model for a given outlier contaminated univariate time series :
For an explanation of the notation, see the “Description” section for TS_OUTLIER_IDENTIFICATION. It follows from the formula above that the Box-Jenkins forecast at origin t for lead time , , can be computed as:
Therefore, computation of the forecasts for is done in two steps:
1. Computation of the forecasts for the outlier free series .
2. Computation of the forecasts for the original series by adding the multiple outlier effects to the forecasts for .
Step 1 above:
Since
where
the Box-Jenkins forecast at origin for lead time , , can be computed recursively as:
Here,
and
Step 2 above:
The formulas for Lj(B) for the different types of outliers are as follows:
Innovational outliers (IO)
Additive outliers (AO)
Level shifts (LS)
Temporary changes (TC)
Assuming the outlier occurs at time point tj, the outlier impact is therefore:
Innovational outliers (IO)
Additive outliers (AO)
Level shifts (LS)
Temporary changes (TC)
From these formulas, the forecasts can be computed easily.
The percent probability limits for and are given by
where is the percentile of the standard normal distribution, is an estimate of the variance of the random shocks (returned from routine TS_OUTLIER_IDENTIFICATION), and the weights are the coefficients in
For a detailed explanation of these concepts, see Chapter 5: “Forecasting”, Box, Jenkins and Reinsel (1994).
Example
This example is a realization of an ARMA(2,1) process described by the model , a Gaussian white noise process.
Outliers were artificially added to the outlier free series at time points (level shift, ) and (additive outlier, ), resulting in the outlier contaminated series . For both series, forecasts were determined for time points and compared with the actual values of the series.