outliers.regressors | R Documentation |
These functions create regressor variables to be used included in the regression where tests for presence will be applied.
outliers.regressors(pars, mo, n, weights = TRUE,
delta = 0.7, freq = 12)
pars |
a list containing the parameters of the model.
See details section in |
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 |
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, |
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
.
A matrix containing the regressors by columms.
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.
Kaiser, R., and Maravall, A. (1999). Seasonal Outliers in Time Series. Banco de España, Servicio de Estudios. Working paper number 9915. http://www.bde.es/f/webbde/SES/Secciones/Publicaciones/PublicacionesSeriadas/DocumentosTrabajo/99/Fic/dt9915e.pdf
locate.outliers
, outliers
,
outliers.tstatistics
, tso
.
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.