a list containing the parameters of the model.
See details section in locate.outliers.
mo
a data frame defining the type, location and weight of the outliers to be created.
n
a numeric. The length of the variable that will contain the outlier.
weights
logical. If TRUE, the variables are weighted by the
values in column "coefhat" of the data frame mo. Otherwise,
unit weights are considered.
delta
a numeric. Parameter of the temporary change type of outlier.
freq
a numeric. The periodicity of the data.
Used only for the seasonal level shift, "SLS".
n.start
a numeric. The number of warming observations added to the
input passed to the Kalman filter. Only for pars of class "stsmSS".
Details
The variables returned by these functions are the regressors that take part in
the second equation defined in locate.outliers,
(equation (20) in Chen-Liu (1993), equation (3) in the documentat
attached to the package).
Regressions are not actually run since the t-statistics
can be obtained more conveniently as indicated in equation (14) in Chen-Liu (1993).
These variables are used in function locate.outliers.iloop to
adjust the residuals at each iteration.
The function outliers can be used to easily create the input
argument mo.
Value
A matrix containing the regressors by columms.
References
Chen, C. and Liu, Lon-Mu (1993).
‘Joint Estimation of Model Parameters and Outlier Effects in Time Series’.
Journal of the American Statistical Association,
88(421), pp. 284-297.
# regression of the residuals from the ARIMA model
# on the corresponding regressors for three additive outliers
# at the 5% level, the first AO is not significant, the others are significant
data("hicp")
y <- log(hicp[["011600"]])
fit <- arima(y, order = c(1, 1, 0), seasonal = list(order = c(2, 0, 2)))
resid <- residuals(fit)
pars <- coefs2poly(fit)
mo <- outliers(rep("AO", 3), c(10, 79, 224))
xreg <- outliers.regressors(pars, mo, length(y))
summary(lm(residuals(fit) ~ 0 + xreg))